Rastar Posted September 18, 2013 Share Posted September 18, 2013 I have finally made the leap and started to get in to shader programming. While this is a complex topic in itself, it is made even harder for a beginner like me to understand the interaction with Leadwerks itself, specifically which data is passed into the shaders by naming convention. Some information can be guessed by looking into the supplied shaders, but many open questions remain. So my request would be to add a section on shader programming in to the docs. Doesn't have to contain thins like "How do I create a rim lighting?" but rather the Leadwerks specific stuff. One example (and my concrete question): It seems there is a color encoded in the last column of the entity matrix - which one is it? 4 Quote Link to comment Share on other sites More sharing options...
Josh Posted September 18, 2013 Share Posted September 18, 2013 Good idea. FYI: vec4 color = vec4(entitymatrix[0][3],entitymatrix[1][3],entitymatrix[2][3],entitymatrix[3][3]); Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rastar Posted September 18, 2013 Author Share Posted September 18, 2013 Yes, I saw that line. But where are the values coming from (in terms of the editor)? It's not the diffuse color, since there is a separate materialcolordiffuse uniform for that. Quote Link to comment Share on other sites More sharing options...
shadmar Posted September 18, 2013 Share Posted September 18, 2013 +1 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Admin Posted September 18, 2013 Share Posted September 18, 2013 That is the entity's color, set in the Appearance tab in the properties editor. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted September 18, 2013 Share Posted September 18, 2013 I had an interest in dabbling in this as well but I wouldn't know where to start. Some simple examples (like for the functions) and especially a section in the Getting Started page would go a long way. But I also think that this can wait until next year as there are a lot of higher priority items on Josh's plate. Quote Link to comment Share on other sites More sharing options...
shadmar Posted September 18, 2013 Share Posted September 18, 2013 Forward rendering is the place to start, in deferred you miss all the fun with lighting and transparency is much more difficult. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Josh Posted September 18, 2013 Share Posted September 18, 2013 I think deferred rendering is much more straightforward and simple. Lighting in forward renderers is always a hack. People complain about transparency lighting problems, but with forward rendering you NEVER have correct lighting. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
shadmar Posted September 18, 2013 Share Posted September 18, 2013 True, just saying you miss out on some basic stuff skipping forward rendering Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Flexman Posted September 20, 2013 Share Posted September 20, 2013 Well you SAY transparency is easier with def'ren. With simple scenes and demos it isn't difficult. Just when you try and assemble something that looks like a decent model with working parts that include a mix of transparent materials it becomes a logistical exercise. 1 Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.