Jump to content

Request for shader documentation and concrete question


Recommended Posts

Posted

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?

  • Upvote 4
Posted

Good idea.

 

FYI:

vec4 color = vec4(entitymatrix[0][3],entitymatrix[1][3],entitymatrix[2][3],entitymatrix[3][3]);

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

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.

Posted

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.

Posted

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.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

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.

  • Upvote 1

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...