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

The Big O.


Mar
26
comment Custom effects on Model in XNA
"The first option is purely a run-time option: iterate over all of the model.MeshParts and directly modify the ModelMeshPart.Effect property to the new effect. I haven't tried this but I would expect it to work." Actually he's doing that at compile time (in a ContentProcessor) and you can't do that at run-time as far as I know. I think what you're trying to say is that I can assign an effect to the model and then just pick whatever technique I want in that effect at run-time. That's true but doesn't answer the question of: how do I use different effects on the same model at run-time?
Mar
25
asked Custom effects on Model in XNA
Mar
25
revised Different number of lights => different shader
added 409 characters in body; deleted 20 characters in body
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