Skip to main content
GameDev.net gamedev.net
🔒 Locked

Shader Driven (Issues?)

Started by webjeff Jan 23, 2008 at 9:44 AM 0 replies 550+ views
Original Post
webjeff
webjeff
Guys: I'm just curious if I'm going to run into any problems with the current way I have rendering setup. Let me explain. I have a system broken down like this:

Model (MyCar.x)
  - Mesh (Body)
     - GeometryChunk (hood material)
     - GeometryChunk (windsheild material)
  - Mesh (Wheels)
     - GeometryChunk (Wheel material)

etc. I attach shaders to the entire model or parts, so I have: Model.AttachShader( "TexturedShader"); Model.AttachShader( "ReflectiveShader"); .. this however, just indirectly adds the GeometryChunks to a list within the Shader. When I render, I do: RenderShader("TexturedShader"); RenderShader("ReflectiveShader"); This render's all the GeometryChunks with that paticular shader. So essentially, I'm sorting by shader (I could sort by texture next within the shader logic). Anyone see any gotcha's to this method that won't work for certain things like shadows or any common effects? Thanks! Jeff.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.