September 2018
Intermediate to advanced
472 pages
15h 36m
English
To create a shader program that generates a paint-spatter effect, perform the following steps:
// Uniforms for the Phong shading model ... // The noise texture layout(binding=0) uniform sampler2D NoiseTex; // Input from the vertex shader in vec4 Position; in vec3 Normal; in vec2 TexCoord; // The paint-spatter uniforms uniform vec3 PaintColor = vec3(1.0); uniform float Threshold = 0.65; layout ( location = 0 ) out vec4 FragColor; vec3 phongModel(vec3 kd) ...
Read now
Unlock full access