0
votes
1answer
92 views

Multiplying matrices in HLSL

I have code that calculates a position like this in HLSL: output.ShadowPos = input.VertexPos; output.ShadowPos = mul(output.ShadowPos, gWorld); output.ShadowPos = mul(output.ShadowPos, ...
4
votes
1answer
135 views

PCF shadow shader math causing artifacts

For a while now I used PCSS for my shadow technique of choice until I discovered a type of percentage closer filtering. This method creates really smooth shadows and with hopes of improving ...
12
votes
1answer
306 views

Accounting for waves when doing planar reflections

I've been studying Nvidia's examples from the SDK, in particular the Island11 project and I've found something curious about a piece of HLSL code which corrects the reflections up and down depending ...
2
votes
0answers
126 views

Stereo 3D: drawing 2D elements at apparent screen depth

I'm developing an application making use of DirectX11's stereoscopic features. At such I am not relying on nVidia's automatic implementation. That means I have to replicate a way to render 2d elements ...
2
votes
2answers
221 views

Why does matrix multiplication lead to different result if it's done on CPU, compared to GPU(shader)?

If I'm calculating a "camera space" on the CPU, by multiplying the view with the projection matrix on the CPU , and afterwards multiplying the world to the result my vertices do not pass to the pixel ...
4
votes
1answer
462 views

What happens to data between vertex shader and pixel shader?

Short version: What can happen to the output of a vertex shader that leads to no(or very few) pixels being drawn, especially in relation to a perspective matrix. Long version: My problem refers to ...
3
votes
2answers
692 views

How to achieve hologram projection effect with head tracking

I want to recreate this: http://www.youtube.com/watch?v=9xMSGmjOZIg&feature=related I can take care of tracking the user's head, and in one of the comments I believe the author says that he used ...
1
vote
1answer
393 views

Perlin noise example the same on CPU as GPU?

I am looking for an example site with a Perlin Noise implementation in both CPU and GPU, that generates somewhat the same results in those two places. I see many CPU implementations of Perlin Noise, ...
7
votes
3answers
2k views

Rotating a vector by another vector in shader

I have a terrain surface with a normal for each point on the terrain. I have a second detail normal map to be applied to the terrain. These normals are in 3-space. The Y value of both normals is ...
2
votes
3answers
3k views

2D shader to draw representation of rotating sphere

I want to display a 3D textured sphere, and then rotate it in one direction. The direction will never change, and the camera will never move. One way is to actually create a spherical mesh, map a ...