Questions tagged [hlsl]

HLSL (High Level Shader Language) is a proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Unity angular gradient shader

I have created a HLSL shader in Unity to be used in combination with an image component. The angular gradient supports 2 colours, and can be masked by the source Image of the Image component. The ...
4
votes
1answer
544 views

Optimizing HLSL shader

I am trying to optimize my vertex and pixel shader code. Do you have any suggestions what could I possibly do to improve performance? I am using it to draw textured cuboids, and if there are many ...
2
votes
0answers
169 views

HLSL Shader Model 4: Is there a way to avoid pixel shader computing all code paths?

I have a pixel shader that needs to output either a plain colored pixel or a texel sampled from one of three textures - selected by a switch statement operating on an index fed in by the vertex shader:...