Hi Gerrit,

if I pass the state from a ChunkMaterial with a ShaderProgramChunk to 
DrawEnv::activateState, it does not seem to enable the shader (bugle 
shows no shader compilation etc. happening).
The problem seems to be that RenderPartition::dropFunctor is (partially) 
in charge of handling the transition from the front end representation 
(ShaderProgramChunk) to the back end representation 
(ShaderExecutableChunk) which makes it hard to obtain translated state 
for use in e.g. a Stage with mode SimpleCallback [1].

I worked around it by just creating a normal partition and using 
RenderPartition::dropFunctor, but it looks a bit as if SimpleCallback 
partitions are second class citizens?
One other implication of the way shaders are handled ATM is that 
ShaderProgramChunk behaves different from any other chunk when used in a 
ChunkOverrideGroup (COG). Consider:

  COG Shader A, with function foo()
   |
  COG Shader B, with function main()
   |
   +-----------------------------------------+
   |                                         |
Geo1                          COG Shader C, with func main()
                                             |
                                            Geo2

Geo1 will render fine using shader B (which may call foo from main), for 
Geo2 I'd expect a link error because there are two main functions.
Under normal COG semantics Geo1 should fail, because shader A gets 
hidden (not what one wants, but consistent) and Geo2 should be fine 
rendering just with shader C.
I know you said at one point something about adding useful override 
semantics, so I suspect this is not the final state of things?

        Thanks,
                Carsten


[1] I'm creating a DeferredShadingStage and the second pass where I 
render just a quad with a "shading" shader and all the previously 
generated buffers as textures gives me problems. It seemed natural to 
run this as a partition with just a simple callback.

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to