Timeline for How to pass a big (60+) amount of variables to an HLSL pixel shader?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 19, 2015 at 17:19 | vote | accept | PinkTurtle | ||
Aug 18, 2015 at 3:02 | comment | added | Chuck Walbourn | This is the classic "Direct3D 9" design where you had to use a global set of constants. This is an extremely inefficient way to use Direct3D 11 Constant Buffers. See Windows to Reality: Getting the Most out of Direct3D 10 Graphics in Your Games--yes this is a Direct3D 10 era talk but it 100% applies to Direct3D 11 too. | |
Aug 17, 2015 at 5:59 | answer | added | cfehunter | timeline score: 7 | |
Aug 16, 2015 at 21:55 | comment | added | PinkTurtle | I know I started with OpenGL and uniform bindings but went to DX ;) Anyways I could fix my issue at using a cbuffer instead with proper alignement. I used to fail it but found the culprit. | |
Aug 16, 2015 at 21:51 | comment | added | wondra | Seeing nobody answered yet - I dont know much about dx11, but if you used openGl you could use texture or a buffer where usually geometry is stored. | |
Aug 16, 2015 at 12:41 | history | edited | PinkTurtle | CC BY-SA 3.0 |
struct
|
Aug 16, 2015 at 12:27 | history | edited | PinkTurtle | CC BY-SA 3.0 |
struct
|
Aug 16, 2015 at 12:25 | comment | added | PinkTurtle | @AlanWolfe I didn't write the pixel shader code yet (I am porting GLSL code to HLSL) but I need all these variables (63+) available in my pixel shader for raytracing computation. I have 4 C++ structs for that purpose - see the one I posted up there. | |
Aug 16, 2015 at 1:25 | comment | added | Ali1S232 | stackoverflow.com/questions/14711763/… | |
Aug 16, 2015 at 0:54 | comment | added | Alan Wolfe | Can you tell us what the parameters are that you are passing and what you are doing with them in the shader? | |
Aug 15, 2015 at 23:45 | history | asked | PinkTurtle | CC BY-SA 3.0 |