Tagged Questions
3
votes
2answers
110 views
Fire range arc behind buildings
need some help with HLSL. Each charater in my game shows a fire range arc (which is a textured model) which show how far the guy can shoot, see
It looks ok, but I hate the fact that it shows even ...
0
votes
1answer
123 views
Some help understanding and modifying a 2D shader
I have a similar question as the one posed here, except that I don't wish to use a 1D Color Palette.
I simply wish to have it display 1 color of my choosing (red, for example). I plan to use this ...
3
votes
1answer
249 views
DirectX11, how do I manage and update multiple shader constant buffers?
Alright, I'm having a hard time grasping how constant buffers are bound to a pipeline stage and updated. I understand that DirectX11 can have up to 15 shader-constant buffers per stage and each buffer ...
1
vote
0answers
233 views
How can I run the pixel shader effect?
Stated below is the code for my pixel shader which I am rendering after the vertex shader.
I have set the wordViewProjection matrix in my program but I don't know to set the progress variable i.e in ...
3
votes
3answers
249 views
Loading and using an HLSL shader?
I've been looking everywhere and all I can find are tutorials on writing the shaders. None of them showed me how to incorporate them into my scene.
So essentially:
Given an hlsl shader, if I were to ...
0
votes
1answer
159 views
How to make a custom semantics HLSL shader for the pixel shader
I'm pretty sure it's possible but i have no idea how.
Could anyone tell me how to make a custom semantic for a pixel shader.
Thanks
5
votes
3answers
413 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
...
4
votes
4answers
490 views
From camera coordinates to world coordinates
I want to calculate world coordinates from camera coordinates. However, I seem to have problems with my understandings of how matrices in HLSL work.
From world to camera is clear:
cameraPosition = ...
5
votes
2answers
353 views
Rendering collections of light sources
I have a small test environment where small point lights are scattered. Players should able to collect them.
The collectible lights are rendered using a simple billboard technique where two triangles ...
4
votes
2answers
412 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 = ...
1
vote
3answers
514 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 ...
2
votes
2answers
331 views
Compatibility between DirectX 9 and DirectX 10 shaders
I am a beginner to game development and as I am used to programming in C# I decided to go for XNA. I've been playing around with it for a while and now I am learning the basics of HLSL shaders, I have ...
10
votes
6answers
847 views
Modern Shader Book?
I'm interested in learning about Shaders: What are they, when/for what would I use them, and how to use them. (Specifically I'm interested in Water and Bloom effects, but I know close to 0 about ...
0
votes
1answer
252 views
Porting an HLSL 3.0 shader to 2.0?
I have a couple of .fx files from a Shader-Based 2D Shadows example. I want to utilize the same kind of technique with XNA 4.0's Reach profile, which if I understand correctly needs to have HLSL 2.0 ...
6
votes
3answers
453 views
Very slow direct3D texture sampling
So I'm writing a small game using Direct3D 9 and I'm using multitexturing for the terrain. All I'm doing is sampling 3 textures and a blend map and getting the overall color from the three textures ...
13
votes
5answers
2k views
10
votes
3answers
508 views
HLSL Translucent Plastic Shader
I'm trying to produce a shader to replicate a white plastic object with a colored light inside. Either by having a shader that will be translucent and if I put a light inside the object the light will ...
12
votes
8answers
619 views
What are some good resources for learning HLSL?
The last time I tried learning HLSL, I made a few shaders and mostly understood what I was doing, but I still felt like I was stumbling in the dark. Most of what I learned I got from various blog ...