Questions tagged [shader]

A shader is a program to perform calculations on geometry or pixel data in computer graphics.

A shader is a program to perform calculations on geometry or pixel data in computer graphics. With the rapid progress and availability of consumer GPUs during the last decade, an initially software-only solution for high-end RenderMan workstations became widely available. Today, the term is mostly associated with , , , or , which allow convenient, hardware agnostic high-level programmability on consumer GPUs.

6931 questions
2
votes
1 answer

Metal shader stage_in

I have a simple Metal shader downloaded from here: https://medium.com/@MalikAlayli/metal-with-scenekit-create-your-first-shader-2c4e4e983300. I have modified it by adding clip_distance to VertexOut. Everything works fine if clip_distance is a float.…
Mark Lau
  • 147
  • 1
  • 9
2
votes
0 answers

Unity shader graph slow

Unity 2020.3.12f1 HDRP Whenever I add a single node in Shader Graph, the progress bar "compiling shader" takes around 20 seconds to complete. Multiply that by dozens of nodes and we're talking a very long time. Is there any way to speed this up?…
gatzkerob
  • 877
  • 2
  • 12
  • 32
2
votes
1 answer

Setting attributes in the vertex shader in openGL

I have been learning OpenGL recently and I have got bit confused about shaders and the VBOs. Basically, I am confused on how my vertex shader knows about the colour and position data in my VBOs. To my knowledge glBindAttribLocation(program,…
Egg42
  • 65
  • 5
2
votes
1 answer

How to create a high-resolution offscreen fragment shader?

I figured out my fragment shader is limited to the pixel dimensions of the OpenGL ES viewport. Could I create an "offscreen fragment shader" or rendering environment which has a lot more pixels for rendering?
2
votes
2 answers

SCNShadable in SceneKit pass float array to shader modifier

I am using SCNShadable's shader modifiers in SceneKit. I want to pass an array of float vectors (float3's). In the SCNShadable docs, under the section "Providing Custom Inputs to a Shader Modifier", the following table is presented with data type…
A. Claesson
  • 529
  • 4
  • 16
2
votes
1 answer

Three.js InstancedMesh: Shader is NOT changed after updating instance matrix

I am using InstancedMesh with an custom outline shader: