Back to shaders

Shader test bench

White Point Adjust.fs

vidvox-isf-files utility glsl runnable fragment MIT
Source
runnable fragment

Complete GLSL fragment shader. Stronghold runs it directly when the browser can compile it.

Code

uniform sampler2D inputImage;
uniform vec4 newWhite;
precision mediump float;
/*{
	"CREDIT": "by zoidberg",
	"ISFVSN": "2",
	"DESCRIPTION": "Modifies the white point by multiplying the src pixel by the color value",
	"CATEGORIES": [
		"Color Adjustment"
	],
	"INPUTS": [
		{
			"NAME": "inputImage",
			"TYPE": "image"
		},
		{
			"NAME": "newWhite",
			"TYPE": "color",
			"DEFAULT": [
				1.0,
				1.0,
				1.0,
				1.0
			]
		}
	]
}*/



void main() {
	vec4		tmpColorA = IMG_THIS_PIXEL(inputImage);
	gl_FragColor = tmpColorA * newWhite;
}