Questions tagged [shaders]
a computer program that runs on graphics hardware and provides a high degree of control over how scenes are rendered
2,045 questions
0 votes
0 answers
37 views
How to implement a bilateral filter in a shader?
I want to implement a bilateral filter because I have read the it preserves the edges. The equation is given as: $$ BF\left[I\right]_p = \frac{1}{W_p}\sum_{q\in S} G_{\sigma_s}\left( \left\Vert p-q \...
0 votes
0 answers
40 views
Can a single large SSBO in vulkan store different types of structs?
I was using tinkering with vulkan and was wondering if a SSBO can store a mix of structs of different kind like shown in picture and pass offsets of the said structs to access them in shader.
0 votes
1 answer
73 views
How to make volumetric scanning effects
I have an effect where a character has a small tool that emit a sort of scanning effect to detect some property of an object. My FX is simple as it uses a pyramidal mesh whose top is positioned where ...
0 votes
1 answer
127 views
Mipmaps and LOD Behavior in Skybox Shaders
Is it beneficial to use Generate Mipmaps for a texture used in a skybox shader? I need to use tex2Dlod to fix the edge seams ...
1 vote
0 answers
62 views
How can I dynamically make a distance field shape of the lit part of the moon to use it as a halo in a custom skybox shader?
I created a custom skybox shader featuring a black sky with only the moon and its halo. The moon responds realistically to the scene’s directional light (sunlight), which creates a convincing effect. ...
0 votes
0 answers
35 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
112 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
1 answer
91 views
Unity shader optimization
I have a problem with badly optimized palette cycling function of the background shader: ...