Questions tagged [shaders]
a computer program that runs on graphics hardware and provides a high degree of control over how scenes are rendered
2,044 questions
0
votes
0
answers
38
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:
...
0
votes
1
answer
156
views
How do you detect edges in a PNG map
so basically i'm making a personal project based around a strategy map game.
I'm using this image as the map:
The problems are as follows:
I can't detect the borders as it is not an SVG
If the first ...
0
votes
0
answers
69
views
How do you make unity shader with custom lighting usable in deferred rendering mode
I found a unity shader with custom lighting method that approximates subsurface scattering effect. I tried using it in deferred rendering mode and unfortunately it doesn't work. From what I have read ...
0
votes
0
answers
134
views
How do I add an outline to a Unity tilemap?
Is it possible to add a nice outline to a unity tilemap?
For example, if my tilemap looks something like the image on the left, I want to make it render like the image on the right:
I found this ...
0
votes
0
answers
27
views
Lost preview frames on ID3D10RenderTargetView in DirectX 10
Problem: This code should do a right-shifting trailing effect by accumulating previous frames on g_pSurfaceImg[0] but fails.
Incorrect result: the image that should ...
1
vote
0
answers
66
views
Can I apply a single material over every submesh?
I have a shader for outlining an object, how do I apply the material with this shader to all submeshes, not just the last one?
0
votes
1
answer
46
views
Problems supplying per-vertex alpha data to Monogame shader
I am trying to make a trail renderer in Monogame. What I have currently is a procedurally created trail-mesh with properly applied UV coordinates, and what I have left to do is apply a per-vertex '...
0
votes
1
answer
169
views
Is memcpy safe to use to fill an ID3DBlob with a pre-compiled shader?
Following my post Saving shaders to file I then tried to load shader object files to recreate my shaders.
I found some Q&A about how to load precompiled HLSL shaders into memory, including a short ...
0
votes
0
answers
67
views
Increasing final image scaling with shaders on top to 125%?
When I apply the canvas_item barrel distortion shader to my viewport, there is a noticeable loss of resolution in the center of the screen. Therefore, is it possible to scale the final image + fisheye ...
0
votes
1
answer
120
views
Do I need vertex array object in this case?
In the case of having the vertex attributes (i.e. position, color, etc) hardcoded in the shaders, why do I need to explicitly create a vertex array object (VAO)? If I remove the VAO, nothing is drawn. ...
1
vote
0
answers
71
views
Weird artifacts on heightmap
so i have this compute shader in glsl that creates a heightmap:
...
0
votes
0
answers
151
views
How are blend weights are determined in animation blending?
According to this Anim Coding tutorial:
In additive animations, additional movements are layered on top of existing animations. This allows for complex actions to be created without the need for ...
1
vote
0
answers
47
views
CGLM Not Rendering with Sokol [closed]
I've setup cglm from a wrap configured with Meson, and have copied one of the samples from https://github.com/floooh/sokol-samples/tree/master (cube-sapp, to be exact). I've tried to replace sokol's ...
0
votes
1
answer
140
views
Shader to make tall grass black and white near player in 3d game for Godot 4
I'd like to add effects to the tall grass near the player in Godot 4. I think it has something to do with putting all that grass in a layer, than rendering it separately. I'm currently simply trying ...
1
vote
1
answer
136
views
Why do I see a wireframe when rendering with conservative rasterization and disabled Z writes?
I wrote a shader that implements most ShaderLab commands:
Rendering without anything fancy:
After enabling conservative rasterization:
After disabling Z write:
Ironically, that's exactly what I ...
0
votes
0
answers
111
views
How to project textures on to the mesh and overlap them like in Let’s Play Pottery?
I want to learn how to project textures on to the mesh and overlap them like in Let’s Play Pottery. I have an idea for game. I created Models, 3d viewer but I can’t figure out how to implement texture ...
0
votes
0
answers
74
views
What is the rendering method used in "viewport shading: solid" in Blender?
https://streamable.com/km0hv0
I want to make a low-poly game.
I noticed that in blender in viewport shading mode, when the camera rotates, the face progressively change color, from grey to black, ...
0
votes
1
answer
272
views
Water shader Breaks on Build
A custom shader I made is breaking on build.
Here's what it's supposed to look like:
Yet, on the build it looks like this. The surface is completely flat, all details are gone, and sometimes the ...