Skip to main content

Questions tagged [hlsl]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
111 views

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
35 views

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
218 views

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
113 views

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
40 views

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
  • 333
0 votes
0 answers
54 views

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
  • 333
0 votes
2 answers
225 views

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
  • 333
0 votes
1 answer
88 views

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
  • 333
0 votes
1 answer
74 views

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
  • 333
0 votes
1 answer
82 views

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
224 views

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
110 views

Well, I have this triplanar shader: ...
z3nth10n's user avatar
  • 141
0 votes
1 answer
264 views

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
498 views

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
80 views

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
2 votes
1 answer
159 views

I'm a noob shader learner, and I came across this question about animated shaders in Unity: Animated textures for models; How to write a shader? After reading the answer, I kind of understood the ...
V.R.S's user avatar
  • 35
0 votes
1 answer
212 views

I have been working on an Infinity Grid shader for my engine. It was already implemented to Vulkan’s GLSL, so it worked great with OpenGL’s (4.6) GLSL. Here's a reference. This basic shader with ...
Kenny Tutorials's user avatar
0 votes
1 answer
309 views

I have a 2D pixel art game where characters can be covered in a flammable black oil-like substance and I am looking for a simple way to depict that visually. Simply tinting the character black won't ...
Martin's user avatar
  • 63
0 votes
0 answers
397 views

This is a further question from my last, originally I was trying to change the way the depth map is rendered per-pixel. However, through more testing, I've found that actually it has nothing to do ...
Pow's user avatar
  • 449
0 votes
0 answers
61 views

...
mueoc mueoc's user avatar
1 vote
1 answer
152 views

I have a small issue with my shaders. Sorry if it is not the right place for this question. In general, the essence is that for my application on dx12, I have shaders in glsl (I'm too lazy to rewrite ...
Zhukov Artem's user avatar
1 vote
0 answers
129 views

I am looking to achieve the following: I have a compute shader that receives a Texture2D as input, where a small percentage of the pixels in the texture are white. ...
Daniel Cardin's user avatar
4 votes
0 answers
144 views

I have some basic shapes in the background of a scene that represent a small city. There is a stage where the scene becomes a nights scene. I would like to have the city come to life at night with ...
Charl Cillie's user avatar
3 votes
1 answer
363 views

I have been trying to create a voxel cone tracer for Unity (in Universal Render Pipeline 16). I have this (unoptimized) C# code that turns the [CubeScale] area around 0,0,0 of the scene into a 3D ...
MacksNotCool's user avatar
0 votes
1 answer
603 views

I have this situation where I have parts of the same scene in each 4 half squares of a rendertarget rendered with the same view projection matrices. In my deferred pipeline I would like to sample with ...
philB's user avatar
  • 333
0 votes
1 answer
462 views

I made the below shader to draw a mesh for every pixel on a texture, and color it with that pixel. It iterates through the pixels, correctly drawing and coloring the mesh instances. However it skips ...
Wiley Rush's user avatar
2 votes
1 answer
2k views

I've written a custom shader (with help) and I'm not sure why it does not have tiling & offset capabilities. What is the simplest way to add that feature to my shader? current shader code ...
Jacksonkr's user avatar
  • 259
1 vote
2 answers
445 views

I would like to use a texture that could have more than 4 channels. I have seen a post where they use a single channel R8 texture to store string chars. I'm thinking of using something like that with ...
philB's user avatar
  • 333
0 votes
0 answers
414 views

I want to make a simple ray marching loop in the fragment shader. I think the main issue is that I'm not giving the correct world position input. Here is my current attempt: ...
Nikhil Nair's user avatar
0 votes
1 answer
100 views

My render pass consist in four passes. 3 first have 2 rendertargets and two unordered access view. RTV0 = RG88 //store normal.xy RTV1 = R32 //store depth UAV0 = R32UINT //store color1 UAV1 = R32UINT//...
philB's user avatar
  • 333
0 votes
1 answer
153 views

I am trying to implement a program in Direct3D 11 which uses techniques like deferred shading and shadowmapping, but when I create my gBuffers, the position looks strange. After researching a bit I ...
Charlie.Q's user avatar
0 votes
0 answers
59 views

I was trying to use a texture as a variable in my shader (DX11 VS/PS 5.0). Can't get it. I have recently find this piece of code here where a texture is passed as a function parameter. Is that ...
philB's user avatar
  • 333
0 votes
1 answer
240 views

I have been working on a metaball compute shader for roughly 3 months now, and the only issue I have to resolve is noise in the output Dest[id.xy]. I also asked GPT 4 about the crux of the issue and ...
rasputin's user avatar
0 votes
2 answers
897 views

I want to animate foliage with vertex animation but I have wrong output because I can't correctrly transform from object space to clip space, and my foliage goes off the model. How Can I convert in ...
Silz's user avatar
  • 37
0 votes
0 answers
221 views

I am using a shader that is applying a visual deformation that looks like Gerstner waves. It works great, but I need the mesh's actual vertices to deform based on these formulas as well. How can this ...
yukjaly7's user avatar
1 vote
2 answers
536 views

Can I pack 4 grayscale textures into one channel by converting the textures into uints and packing them? ...
Shiv-iwnl's user avatar
1 vote
1 answer
394 views

I am using MonoGame 3.8.1.303 with Windows/DirectX. I am just rendering a TriangleList using DrawIndexedPrimitives, but I am ...
codymanix's user avatar
  • 394
0 votes
1 answer
588 views

With my hardware limitation for CS5 I'm using R32_UINT in my shaders to store compacted colors and normasl as 555 bits each. My packing is using uint3 and the result is of poor quality. I'm planning ...
philB's user avatar
  • 333
0 votes
1 answer
220 views

I have 4 rendertargets R10G10B10A2 each being used to store color and normal in a compact double RGB 555 bits format. When I'm doing the lighting pass I'm obliged to have extra rendertargets because ...
philB's user avatar
  • 333
0 votes
1 answer
559 views

I'm trying to move a 262,144 [2^18] points (stars) in a compute shader and am struggling to reliably address the data in a buffer. I understand that there's a 3-dimensional array ...
Basic's user avatar
  • 1,287
0 votes
1 answer
252 views

In my app I’m producing for my deferred shading 4 layers of data to show up occluded parts of the scene during screen space reflection (SSR) pass. I need normal maps with bumpiness of these layers for ...
philB's user avatar
  • 333
0 votes
1 answer
844 views

Using DX11 I have this line starting with TC = txDiffuse in a geometry shader that generates the error message. Can someone explain me the problem or if it is not possible to sample in geometry shader ...
philB's user avatar
  • 333
0 votes
0 answers
365 views

I am currently trying to edit a Vertex Shader of a game and want to add inverted hull outlines to the desired objects, but there are a lot of tutorials on the inverted hull for Unity, Blender, and ...
Krish-fz's user avatar
0 votes
1 answer
2k views

I can't get my colors back. What I'm using to encode/decode: ...
philB's user avatar
  • 333
0 votes
2 answers
373 views

UV coordinates for shadow mapping are usually calculated from world position. I want to make it compliant with my screen space reflection (SSR) pipeline which works in view space. Is it possible to ...
philB's user avatar
  • 333
0 votes
0 answers
412 views

I know something about shaders, I have written some very basic shaders. This is the most advanced shader I have written so far. It's been several days since I conceived the idea of trying to recreate ...
blablaalb's user avatar
  • 121
0 votes
1 answer
920 views

There's solutions to convert float to RGBA but I would like to encode a float depth value in RGB format and save the three components in three separated unused alpha channels and recompose when needed....
philB's user avatar
  • 333
0 votes
1 answer
3k views

I've a RGBA16F texturecube for 4 pointlights shadows rendered in one pass. Each color channel stores the object to light distance for one pointlight shadow (e.g red channel is for light 0 and so on). ...
philB's user avatar
  • 333
0 votes
1 answer
368 views

I'm attempting to load a sequence of frames from a GIF into a Texture2DArray using stbi_load_gif_from_memory which returns a ...
Casey's user avatar
  • 2,095

1
2 3 4 5
14