Questions tagged [hlsl]
A proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API.
666 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
80
views
URP Maximum Sample Index (16) with Light Cookie Input
I just recently imported a new asset package, all of the materials use the URP lit shader, no custom shaders. However, now I can't build the game because I keep getting the same errors:
...
0
votes
0
answers
26
views
HLSL Automatic Root Signature Creation
I know of two different ways to specify a root signature in DX12, and those are:
Creating one with D3D12_VERSIONED_ROOT_SIGNATURE_DESC and ...
0
votes
1
answer
157
views
Decompiling a DXBC - why is an integer operation working with a massive float?
I'm decompiling a game's shaders with RenderDoc in an effort to understand them, and I encountered this segment:
...
0
votes
1
answer
96
views
What is the proper way to write a pixel shader that only outputs depth?
I have an effect that I want to only write to depth.
commandList->OMSetRenderTargets(0, nullptr, FALSE, &m_mainDepthStencilDescriptorHandle.getCpuHandle());
...
0
votes
0
answers
28
views
Can we use geometry shader to allow or not the drawing based on a stencil value?
I have a forward reflexion protocol producing a reflexion map used for final scene rendering. I can have several heights of ground we can defined as "mirrors". In order to have only one map ...
0
votes
0
answers
32
views
How does SamplerCmp works compared to Sample (PCF shadow blur)
I'm doing 3x3 PCF blur with either Texture.SampleCmp (from CascadedShadow demo in DX11) or Texture.Sample (DX11 SM5) like this
...
0
votes
2
answers
173
views
Difficulty for using asfloat/asuint
I'm trying to convert a RGB color to a RGB555 format to be saved as a float in a R16F or R16UNORM texture.
I have a method that works quite well using only float maths for both types of surface but I ...
0
votes
1
answer
70
views
Advice on how to best use if possible 4 GatherCmpRed to emulate a 4x4 PCF sampling for shadowmap blur
In a part of my level I have shadows close to the camera where a good blur is important. Currently I have implemented a 4x4 PCF, thus requiring 16 texture samplings.
I'm trying to see if the ...
0
votes
1
answer
55
views
Shadow artifact with cubemap shadow for pointlights
I am facing some difficulties with the use of a cubemap shadow associated to a poinlight (represented as the yellow bicone in the picture). The shadow map itself is generated properly (see picture).
...
0
votes
1
answer
57
views
Generate Frustum from Clip Rectangle after Projection
I have an arbitrary Clip Rectangle, ranging from -1 to 1 which was obtained by min/maxing vertices after projection.
I want to cull triangles in a compute shader against this particular rectangle.
...
2
votes
1
answer
175
views
How to sample a R8_UINT texture in hlsl?
I'm a newbie in DX12 and trying to visualize Stencil buffer onto screen. I've been copied stencil plane slice into a DXGI_FORMAT_R8_UINT texture, but when HLSL samples this texture it just returns 0, ...
0
votes
0
answers
91
views
Blending/gradient/smoothing between textures in Texture2DArray in HLSL shader
Well, I have this triplanar shader:
...
0
votes
1
answer
225
views
How to check input/output data for shaders in Renderdoc?
How can I check whether my vertex and pixel shaders' input and output have data in Renderdoc?
I have a problem with my pixel shader when I try to include input color. I get a black screen. When I ...
1
vote
1
answer
441
views
Use DirectX 11 & HLSL in SDL
I saw Lazy Foo using OpenGL & GLSL in SDL, but I want to use DirectX 11 & HLSL in SDL.
Is there a way to do this, and how?
1
vote
0
answers
60
views
Incorrect Screen Space Reflection help
I'm leaving a question because I ran into a problem while implementing screen space reflection.
The way I do it is by sampling the position and normal map saved with deferred rendering, changing it to ...