1
vote
1answer
49 views

SetFloat() in HLSL shader (effect) has no effect - variables stay at 0

I have a problem wherein I'm trying to set two simple float variables in my shader. I have a dozen other shaders in this project where it works fine, but for some reason, I've got a bug in this one ...
0
votes
0answers
135 views

Radiosity using a hemisphere

I'm working on a radiosity processor. I'm projecting scene geometry onto a hemisphere at a high order of tessellation during a visibility pass onto a 1024x1024 render target. The problem is that the ...
2
votes
2answers
121 views

Replacing 4 additive sprite layers with a single shader. Just can't get it right

I'm using directx9 and have 4 textures I want to draw on top of each other. if I do this: PDevice->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_SRCALPHA); ...
1
vote
1answer
150 views

Texture Shaders vs. Pixel/Fragment Shaders?

My question is a simple one. Functionally, practically, and performance-wise, what are the differences between using a D3DX Texture Shader, and using a Pixel/Fragment Shader rendered with a full ...
1
vote
2answers
116 views

In the Direct3D 9 Effect API, how do you find the texture variable linked to a sampler?

In Direct3D 9 effect files you can write a sampler state that specifies a texture variable to use, like Texture2D g_texSkyDome; SamplerState g_samplerSkyDome { Texture = <g_texSkyDome>; ...
0
votes
2answers
323 views

How can I capture every frame in DirectX 9 using a shader

This is actually a follow up to this question How to capture the screen in DirectX 9 to a raw bitmap in memory without using D3DXSaveSurfaceToFile The proponent of the best solution suggested that I ...
6
votes
1answer
487 views

Partial Shader Signatures HLSL D3D11 C++

I had been debugging a problem I was having in a single shader file with 2 functions in it. I'm using DirectX 11, vs_5_0 and ps_5_0. I have stripped it down to its basic components to understand what ...
2
votes
3answers
722 views

Rain effect using DirectX 9 capabilities

Is it possible to achieve something similar to nVidia's rain demo using only shader model 3.0 capabilities? If yes, could you point out a few documents/web resources that are suitable candidates and ...
9
votes
3answers
1k views

Pixel-perfect rendering to a rendertarget with a fullscreen quad

I have some trouble rendering a bunch of values to a rendertarget. The values never end up in the exact range I want them to. Basically I use a fullscreen quad and a pixel shader to render to my ...
5
votes
2answers
848 views

Different number of lights => different shader

I have a shader that computes lighting for each light. PointLight PointLights[10]; uniform const float NumPointLights; for(int i = 0; i < NumPointLights; i++) { lightVec = ...