Skip to main content

Questions tagged [fragment-shader]

A program that runs on the GPU to determine output colors for pixels. Also known as a fragment shader.

0 votes
1 answer
109 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()); ...
TheChamp's user avatar
  • 103
5 votes
1 answer
523 views

Recreating a 3D pixel art water effect

For the past few days, I've been trying to recreate an effect from this blog post on 3D Pixel Art Rendering by David Holland. If you scroll down, you'll reach the Water section in which the author ...
Garflington's user avatar
1 vote
0 answers
89 views

Creating 3d Cloud within the box using Metal shader

I tried to create a cloud filled in the box geometry, I tried using raymarching with noise texture as well direct noise function and fbm - fbm motions is good. but cloud is not get proper result like ...
Krishnan PA's user avatar
0 votes
1 answer
109 views

IIn video games, are slight damage details, like say on a tank, made by modifying the geometry or by using textures?

Here are images of real tanks and I drew arrows into the places with slight damage: In video games, are those made by modifying the geometry or with textures?
kyopa's user avatar
  • 143
2 votes
1 answer
201 views

Hide Horizon Line with Small Terrain?

I'm drawing a sky plane with an atmosphere fragment shader in front of my terrain. It looks pretty much fine at sea level, but if you move above the sea level, the illusion is quickly broken, as you ...
Scollier's user avatar
  • 124
0 votes
0 answers
57 views

tangents and bitangents or larger textures?

This is more of a performance question than anything, but some time ago I learned that to put normal maps in OpenGL 3D rendering, I could do it in two ways... The first is generally what most people ...
Arthur Sally's user avatar
0 votes
1 answer
207 views

GLSL ported shader not working in HLSL

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

GLSL limit uniform sampler2D to 4 for some reason

I'm writing a deferred rendering pipeline and my fragment shader looks like this: ...
Ronen Ness's user avatar
1 vote
1 answer
534 views

Unity shader to give thickness to flat plane

I have this hexagonal grate floor: Which is a flat plane with the following shader: The hex lattice created using the method by Andrew Hung. Albedo and metallic/smoothness shader are just simple ...
Dr Rob Lang's user avatar
1 vote
1 answer
303 views

How can I dynamically change the skin and blush colours of an animated sprite's face in Unity?

I want to achieve this effect in unity when processing my sprites before After I was thinking that I could use two color pickers to tell a shader only to create a gradient if two colors share a ...
hello's user avatar
  • 11
5 votes
2 answers
721 views

How would I mask the player node out of a canvas shader?

I'm making a 3D game, and I want to create a post processing effect using a canvasitem and a colorrect, that effects everything on screen apart from the player. I already have the shader itself made, ...
JackHainsworth's user avatar
0 votes
0 answers
93 views

How to blend local cubemaps?

I have a (GPU) Buffer that contains the World Position and Extents of Local Cubemaps aswell as a TextureArray that contains the textures of the Cubemaps. The Bounds of the Local Cubemaps are Axis ...
Raildex's user avatar
  • 812
0 votes
1 answer
505 views

How to apply sampler2Darray textures to different locations of a single mesh?

In openGL, I have a 3D terrain composed of a grid of 255x255 vertices. The vertex of the lower left corner is at coordinates (-127;-127) and the one of the upper right corner is at coordinates (127;...
Greelings's user avatar
  • 103
0 votes
1 answer
151 views

Which pixels does the fragment shader of an unlit shader, applied on an object, affect in Unity?

Let's say that I have a cube that has an unlit shader applied to it. The shader does basic ray-marching. ...
Nikhil Nair's user avatar
1 vote
0 answers
448 views

Expected a smoothly fading opacity in this Raylib shader, but instead it is chunky

In my main file, I create a regular icosahedron and assign the below shaders to it using the Raylib framework in C++17. I intended for the vertex shader to assign a 1.0 alpha value to points at Z=-5....
James Watson's user avatar

15 30 50 per page
1
2 3 4 5
22