commenting frag shader
This commit is contained in:
parent
f7f1844adb
commit
cd4c08210c
@ -1,23 +1,21 @@
|
|||||||
#version 330
|
#version 330
|
||||||
|
|
||||||
// Input vertex attributes (from vertex shader)
|
// Fragment texture UV coordinate
|
||||||
in vec2 fragTexCoord;
|
in vec2 fragTexCoord;
|
||||||
in vec4 fragColor;
|
|
||||||
|
|
||||||
// Input uniform values
|
// Whole input texture
|
||||||
uniform sampler2D texture0;
|
uniform sampler2D texture0;
|
||||||
uniform vec4 colDiffuse;
|
|
||||||
|
// Viewport size
|
||||||
uniform vec2 viewport;
|
uniform vec2 viewport;
|
||||||
|
|
||||||
// Output fragment color
|
// Output fragment color
|
||||||
out vec4 finalColor;
|
out vec4 finalColor;
|
||||||
|
|
||||||
// Pixel scaling
|
// Pixel scaling factor (pixels per pixel)
|
||||||
const vec2 pixelScale = vec2(1.0, 1.0);
|
const vec2 pixelScale = vec2(1.0, 1.0);
|
||||||
|
|
||||||
void main()
|
void main() {
|
||||||
{
|
|
||||||
|
|
||||||
// Calculate the distance to merge pixels
|
// Calculate the distance to merge pixels
|
||||||
float dx = pixelScale.x * (1.0 / viewport.x);
|
float dx = pixelScale.x * (1.0 / viewport.x);
|
||||||
float dy = pixelScale.y * (1.0 / viewport.y);
|
float dy = pixelScale.y * (1.0 / viewport.y);
|
||||||
|
Reference in New Issue
Block a user