Questions tagged [hlsl]
HLSL(High Level Shader Language) is a proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API
hlsl
1,671
questions
3
votes
0
answers
27
views
Make a Texture3D writeable on the GPU in Unity
I have a Texture3D that I've defined:
tex = new Texture3D(8, 8, 8, TextureFormat.RFloat, false);
for (int x = 0; x < 8; x++) {
for (int y = 0; y < 8; y++) {
for (int z = 0; z < 8;...
0
votes
1
answer
24
views
Issue with reading texture data inside RESHADE Pixel Shader
I am new to reshade, but not new to programming as a whole. I tried to implement a compute shader using modern re shade, who's information was then passed to a pixel shader that passed that data to ...
0
votes
0
answers
61
views
Stream hls/m3u8 with HTML
I was wondering, is it possible to make a html code to play a video file hosted in a host that use hls/m3u to stream the video?, for example, if I have a link let's say: www.hostvideos.com/e/file123 ...
0
votes
0
answers
36
views
HLSL compute shader performance
I use two compute shaders written in HLSL:
The first calculates data and writes it to an intermediate buffer;
The second reads data from intermediate buffer, performs additional calculations and ...
1
vote
1
answer
57
views
Direct3D 11 and 2D : wrong display of a texture
I am still trying to improve my test program about Direct3D 11 in 2D, without any additional library (see direct3d 11 and 2D: pass coordinates of a vertex as int and not float).
I now want to display ...
1
vote
0
answers
35
views
Writing to a RWTexture2D in Fragment shaders
I'm new to this topic, and I know this sounds stupid, but I just really want to learn!
So I found out I can write to RWTexture2D from my fragment shader(according to forum), but I can't really find ...
0
votes
1
answer
29
views
Reading/writing off the end of a buffer
What happens when you read and write off the end of a buffer in a hlsl shader?
In my experience it seems that writing of the end is a no-op, and reading always returns zero.
Is this undefined ...
0
votes
0
answers
23
views
Is there a way to mix grabpass and RimLight?
I started creating a shader that ideally mixes grabpass and rimLight, I learned about multipass, but I don't know how to use them in surface shaders, can someone help or explain it to me?
I searched ...
1
vote
0
answers
30
views
What is the use-case off an offset in texture sampling
In HLSL you can sample a texture with a coordinate and you can pass in an offset
https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-to-sample
The offset is added to texels, ...
2
votes
1
answer
109
views
Load raw texture data / Getting data from compute shader
Overview
I have been working on a compute shader for awhile now. Initially it would take in 1 camera feed of 320x256 pixels. This all works great.
Now I want to be able to handle multiple cameras, ...
1
vote
1
answer
42
views
HLSL: Force order of floating point operations to prevent rounding error
When writing shaders in HLSL, sometimes you can run into very large floating point numbers, and with large floating point numbers, they struggle to maintain precision. When I wrote the blow code, I ...
0
votes
1
answer
69
views
Does D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT require padding in ExecuteIndirect D3D12_COMMAND_SIGNATURE_DESCs?
Do the commands in ExecuteIndirect require padding if they are not 64 bit aligned? So I am implementing some calls to ExecuteIndirect and I was defining the command structure like so:
const ...
0
votes
0
answers
31
views
How to trace shadow rays from a circle?
I'm trying to code my own raytracer for a particle system to draw particles that are a bit overlapped by others with a darker color. Particle is a circle. So I want to trace ray from each particle's ...
0
votes
0
answers
38
views
Problems converting HLSL to Shadergraph. Trying to recreate a CRT monitor effect on a flat texture
I'm trying to create a CRT screen in Unity, that a player can interact with.
The "screen" is a rendertexture, projecting a 2d camera, looking at sprites out of the players view.
I'm using a ...
1
vote
1
answer
93
views
GPU Instancing shader has InstanceID in the wrong order
I am at my wits end with this one. I have been attempting to put together a script that would let me render many instances of a given mesh and material with specific transforms relative to a ...