2,873 reputation
1030
bio website olhovsky.com
location Toronto, Canada
age
visits member for 3 years, 9 months
seen Sep 17 '13 at 22:51

The Big O.


Mar
24
comment Different number of lights => different shader
I'm still not sure why, and if someone can explain why I'll accept their answer, but recompiling my code just now generated a shader that now does not loop all 10 times anymore, and in fact loops the number of times that is specified by NumPointLights.
Mar
24
comment Different number of lights => different shader
Interesting reads, thankyou. To answer your questions, I am determining that it is interating 10 times by inference from the fact that my frame rate is 20fps when I set NumPointLights to 10 or to 2. If I reduce the size of the PointLights struct to 2-3 then the frame rate dramatically increases to about 70fps. Clearly it's iterating through the size of the PointLights struct and clearly I'm pixel shader bound.
Mar
24
asked Different number of lights => different shader
Mar
24
awarded  Commentator
Mar
24
comment HLSL: Using instance float input to select texture index, possible?
A good read but these techniques are not available in DX9, and therefore XNA/XBOX.
Mar
22
accepted HLSL: Using instance float input to select texture index, possible?
Mar
22
comment HLSL: Using instance float input to select texture index, possible?
Well, I am using instancing, which is the problem. +1 for pointing out that mipmapping is possible with texture atlases. I may go that route.
Mar
22
comment HLSL: Using instance float input to select texture index, possible?
What I am trying to accomplish exactly is: I have several hundred instances, and am CPU bound. Draw calls are very expensive on the XBOX360, so I am trying to reduce the number of draw calls that I need to make.
Mar
22
comment HLSL: Using instance float input to select texture index, possible?
I never said anything about only 3 textures. The reason that I don't want to pack multiple textures into a single texture is because then I won't have the ability to use mipmapping, I believe. I don't think that 3D textures are available on the Xbox360 (which uses DX9 plus a few DX10 features). Sticking with your example of 3 textures, how else would I render 3 textures on each instance primitive? A separate pass per texture?
Mar
21
asked HLSL: Using instance float input to select texture index, possible?
Mar
13
awarded  Teacher
Mar
13
revised Does one need normals for a strictly 2d Game?
added 36 characters in body
Mar
13
answered Does one need normals for a strictly 2d Game?
Mar
13
accepted HLSL: Pack 4 values into 32 bit float
Mar
6
awarded  Scholar
Mar
6
comment 2D shader to draw representation of rotating sphere
Just what I was looking for, thanks Sam.
Mar
6
accepted 2D shader to draw representation of rotating sphere
Mar
5
comment 2D shader to draw representation of rotating sphere
I do find that interesting and +1 for the interesting link. However that article mentions nothing about how the mapping of the texture to the circle is done :/
Mar
5
awarded  Editor
Mar
5
revised 2D shader to draw representation of rotating sphere
added 72 characters in body