Skip to main content

Questions tagged [hlsl]

A proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API.

0 votes
1 answer
99 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: ...
Redsam121's user avatar
0 votes
0 answers
34 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 ...
Joni Helén's user avatar
0 votes
1 answer
199 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: ...
Sir Teatei Moonlight's user avatar
0 votes
1 answer
109 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()); ...
TheChamp's user avatar
  • 103
0 votes
0 answers
35 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 ...
philB's user avatar
  • 331
0 votes
0 answers
46 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 ...
philB's user avatar
  • 331
0 votes
2 answers
208 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 ...
philB's user avatar
  • 331
0 votes
1 answer
81 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 ...
philB's user avatar
  • 331
0 votes
1 answer
72 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). ...
philB's user avatar
  • 331
0 votes
1 answer
79 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. ...
Raildex's user avatar
  • 812
2 votes
1 answer
205 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, ...
pixelhistory's user avatar
0 votes
0 answers
101 views

Blending/gradient/smoothing between textures in Texture2DArray in HLSL shader

Well, I have this triplanar shader: ...
z3nth10n's user avatar
  • 141
0 votes
1 answer
256 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 ...
mueoc mueoc's user avatar
1 vote
1 answer
474 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?
M 027's user avatar
  • 125
1 vote
0 answers
76 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 ...
user179368's user avatar

15 30 50 per page
1
2 3 4 5
45