Category "shader"

I want to use a UAV in a pixel shader to read the data in the buffer with the CPU

I would like to have information on the number of vertices that have been increased by doing Tessellation. To do this, we send the vertex information from the D

Refreshing a Variable multiple times a frame(for a texture array in a shader)

I want to Update an integer multiple times in frame so that the fragment-shader can access the right index of a texture array for different objects. I first tri

How to add spacing between Shader Graph sprites

I'm using a shader to render movement along a line. How to make a line have more spacing between sprites Shader Line Screenshot

ARCore: Raw Depth Codelab is not working on my phone

I wanted to test this codelab from Google, but whenever I try to run the part3_completed file/application on my Huawei P30 ELE-L29 phone, I encounter the follow

How do multiple buffers for attributes work in openGL (ES) shaders and C++ api

I have the proverbial cube sample and have been writing some code to test it all and learn more about shaders. My question is about how multiple buffers are ass

Mesh getting cut off

I'm using DirectX 11. I'm trying to draw a Cube mesh to the screen but the bottom half is getting cut off. If I move the camera up/down the bottom half is still

How to include shaders as external files

Is there a way to include this shader code as an external vertexShader.js without quotes and include between "script" tags? var vertCode = 'attribute vec3 coor

Why does GLES20.glCreateShader always returns 0?

I'm trying to make an OpenGL ES app in android using java and I have run in a major issue: GLES20.glCreateShader(type) (type beeing GLES20.GL_VERTEX_SHADER or G

How does one shift hue in CIE-XYZ color space?

I need to implement my own hue rotation function within the CIE color space. I can't find any technical descriptions of how this is done. I found high level des

How to compile HLSL Shaders during build with Cmake?

I'm working on a d3d application and i would like to compile my .hlsl shaders during to build using cmake. I have no idea where to start. this is my current CMa

How can I pass the mouse positions from JS to shader through a uniform?

I want to pass the mouse position to shader through uniform so that the color changes interactively when the mouse is moved. Please see the comments with "ύ

terrain lighting issue Unity

I'm getting some weird effect on my terrain on iOS devices. In editor, it looks fine; on device it shows the light like the image below. The textures on the ter

Why Unity shader is pink in editor game mode, but is correct in editor scene mode?

I am using Universal Render Pipeline, I built a shader which apparently works good. here is the image showing the result, please note that I am in the scene tab

Is it possible to pass a parameter from a technique to a vertex/pîxel shader?

I modified some shaders in unity and I'm trying to modify one in Cryengine. Can I send a parameter when I call a vertex/geometry/pixel shader in the technique?

how to rotate and translate rectangle texture in shader

I'm trying to handle the transform of texture in fragment shader. the resolution of window is (640,360), the rotation is 30 degree, and the scale is vec2(0.5,0.

What does #pragma vertex vert_img do in a Unity shader?

While I built an idea of what vert_img does by observing results, I would like to read a more theoretical explanation that I couldn't find online. For context,

GLSL Shader does not compile, Java and LWJGL shader error

I've encountered this error a few times now when compiling my shaders. Here is the infoLog/Error Vertex shader failed to compile with the following errors: ERRO

OpenGL, diffuse shader

I'm trying to implement very simple diffuse shader in GLSL/openGL. Here's what I got: Vertex shader: #version 130 in vec3 vertPos3D; in vec3 vertNormal3D; un

Draw the midpoint lines between points

I am making generated shapes in a fragment shader and part of it involves drawing the border between objects ie the dividing line between them. Currently I have

How to colour vertices as a grid (like wireframe mode) using shaders?

I've created a plane with six vertices per square that form a terrain. I colour each vertex using the terrain height value in the pixel shader. I'm looking f