Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [hlsl]

The tag has no usage guidance.

1
vote
1answer
50 views

Convert RGB image to YUV420 using a hlsl shader

I am new to shaders and I need to convert efficiently an RGB image to YUV420. I can convert the RGB image to YUV420 with a simple c++ program that uses the ...
2
votes
1answer
32 views

R16_FLOAT, SampleCmp and CheckFormatSupport

I want to use PCF shadow map on my d3d11 app. My shadow map is an R16_FLOAT texture. When I use SampleCmpLevelZero it didn't give a correct result. After enabling debug layer, it shows: The Shader ...
4
votes
0answers
100 views

Direct3D Global Atomic Issue

Recently I ran into an odd issue with some of my DirectX11 DirectCompute code when trying it on an AMD GPU for the first time where as on a NVIDIA one it had worked fine all through development. The ...
6
votes
1answer
229 views

Precision problem on AMD

I have a problem with precision on AMD in shaders (hlsl). In vertex shader I calculate UVs for particle using modulus operator ...
1
vote
1answer
211 views

How to scale and offset a cubemap using sphere mapping

I am trying to scale and repeat a Cubemap with Latitude-Longitude mapping layout just as you would do with classical UV mapping but without any interesting result. This should be used as a skybox. ...
1
vote
1answer
114 views

Changing sin frequency smoothly in shader

In my vertex shader I am using a sin function to offset vertices. But as I change the frequency of my sin function I notice some ...
4
votes
1answer
421 views

Unexpected results from Mitchell-Netravali

I recently implemented Mitchell-Netravali filtering in my path-tracer with 16x (4x4) temporal anti-aliasing. PBR's demonstration image shows it should give significantly better results than the box ...
1
vote
0answers
215 views

Depth aware blur - Kawase

I am using this Kawase Blur, to apply blur onto my buffer. But I would like to apply this blur in an uniform way, no matter the distance of the objects from the camera. I guess that I need to use the ...
4
votes
1answer
783 views

Threads per compute shader group

The maximum allowed number of threads per compute shader group is 1024 for Shader Model 5.0. Is it advisable with regard to performance to stay close to this maximum number? In order to resolve SSAA ...
2
votes
1answer
181 views

Artifacts in omni light shadow mapping

Spotlight My spotlight's intensity is cut off at a distance of 3 and at an angle of $\pi/4$ radians (umbra angle). The corresponding light camera has a near plane at a distance of 0.1, a far plane at ...
5
votes
1answer
216 views

Special Texture Stretching without deformation

I am trying to achieve a special texture stretching effect in my shader. Here is how I define my uv before sampling my texture, nothing really special. ...
2
votes
0answers
60 views

Implementation of the paper “unified texture management of arbitrary meshes”

I briefly read the paper and I think I got the basic idea of it. The paper doesn't really go into implementation details though so my question is mostly on that. In the paper, needed tiles are ...
5
votes
1answer
1k views

What are Jittering and Dithering

I've heard a lot about jittering and dithering but I would like to know more about those techniques, especially when used to avoid visible sampling in a fragment shader. What are the differences ...
2
votes
0answers
114 views

If statements in shaders - implications and consequences [duplicate]

I've heard a lot that in shader development, you absolutely need to avoid branching and so if statements. But why? Does this have a real impact on performances on old and modern hardware or is it ...
6
votes
1answer
623 views

UV Coordinate Interpolation in Compute Shader

I am trying to get the screen space position of each pixel in a texture on a mesh and write it into a texture. I was hoping to use a compute shader to do this: ...
5
votes
1answer
454 views

Register pressure in Compute Shader

I'm in the process of writing a Ray Tracer using DirectCompute / HLSL. First, eye rays are generated (one per pixel). Then, rays are traced, shaded and reflected in a loop. Also, shadow rays for each ...
5
votes
3answers
340 views

Texture coordinates projection

I have some classic texture coordinates and as a normal behaviour they follow the mesh's transformations. I am trying to use the same texture coordinates behaviour but without being affected by the ...
8
votes
2answers
649 views

Eye Parallax Refraction

I am trying to implement the Parallax Refraction effect explained by Jorge Jimenez on this presentation: http://www.iryoku.com/downloads/Next-Generation-Character-Rendering-v6.pptx and I am facing ...
5
votes
2answers
241 views

Special directional light type

I am currently trying to implement a specific directional light type. This light type has been used in the game INSIDE and is called orthogonal spotlight (aka local directional light). I assume that ...
5
votes
1answer
166 views

Error with tube lighting

I have recently been working on area lights for a small open source game engine called Urho3D but have run into an issues when rendering tube lights where the lights look the same as sphere lights ...
7
votes
2answers
246 views

Is there a objective reason for matrix naming conventions?

I'm probably going to screw this up but.... In all the graphics libraries I've seen various matrices are often called something along the lines of ...
4
votes
1answer
90 views

Hlsl - registers type

Is there any difference between registers types in hlsl? For example when using register t0 for UAV will it be somehow precache ...
1
vote
3answers
192 views

Trouble Finding Simple 2D DirecX11/HLSL Issue

Some possible things that might be the issue and could be explained by someone who is knowledgeable Order of my indices, In all I've read, your array of indices for a triangle list is just clockwise ...
6
votes
1answer
694 views

HLSL Deferred Rendering

I've recently made the switch to Visual 2015 and the .fx files have been depreciated. My project contained .fx files for the shaders so I've been switching over. Only during the switch have I changed ...
5
votes
1answer
257 views

Jitter texture generation

I am currently reading the awesome paper by Jorge Jimenez about Character rendering : Next Generation Character Rendering In the part about multi-sampled transmittance he uses some Poisson offsets ...
7
votes
0answers
123 views

Injecting Virtual point lights into 3D Grid

I am currently trying to implement light propagation volumes in DirectX 11 and I have already done the RSM part which contains position, normal, depth and flux map generation. But for Injecting ...
5
votes
1answer
335 views

Texture glitch when using simple pixel shader

I have an issue with rendering my textures in Silverlight. When I look at it from above everything looks fine: But if I only change angle of watching it it looks terrible: I am using very simple ...
7
votes
3answers
299 views

Changing image so it would look like through colorful glasses

I am currently working on some simple pixel shader in HLSL. I send to shader texture and I want to make it more colorful (something like in the picture below). In the picture 1 there is original ...
6
votes
2answers
237 views

What factors affect which shader language to learn?

I don't know any shader languages. I've heard of GLSL and HLSL, and I'm interested in learning one or both. Are there significant differences between them that would make one or other better in ...