Document the blit shaders
This commit is contained in:
parent
9515451e7a
commit
a81c69c34e
|
@ -8,15 +8,20 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
/// Blits a texture, applying gamma correction.
|
//! Blits a texture, applying gamma correction.
|
||||||
|
|
||||||
precision mediump float;
|
precision mediump float;
|
||||||
|
|
||||||
|
/// The source texture to blit.
|
||||||
uniform sampler2D uSource;
|
uniform sampler2D uSource;
|
||||||
|
|
||||||
|
/// The approximate background color, in linear RGB.
|
||||||
uniform vec3 uBGColor;
|
uniform vec3 uBGColor;
|
||||||
|
|
||||||
|
/// The gamma LUT.
|
||||||
uniform sampler2D uGammaLUT;
|
uniform sampler2D uGammaLUT;
|
||||||
|
|
||||||
|
/// The incoming texture coordinate.
|
||||||
varying vec2 vTexCoord;
|
varying vec2 vTexCoord;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
@ -8,12 +8,14 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
/// A trivial shader that does nothing more than blit a texture.
|
//! A trivial shader that does nothing more than blit a texture.
|
||||||
|
|
||||||
precision mediump float;
|
precision mediump float;
|
||||||
|
|
||||||
|
/// The source texture to blit.
|
||||||
uniform sampler2D uSource;
|
uniform sampler2D uSource;
|
||||||
|
|
||||||
|
/// The incoming texture coordinate.
|
||||||
varying vec2 vTexCoord;
|
varying vec2 vTexCoord;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
@ -8,21 +8,23 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
/// A trivial shader that does nothing more than blit a texture.
|
//! A trivial shader that does nothing more than blit a texture.
|
||||||
|
|
||||||
precision mediump float;
|
precision mediump float;
|
||||||
|
|
||||||
/// A 3D transform to apply to the scene.
|
/// A 3D transform to apply to the scene.
|
||||||
uniform mat4 uTransform;
|
uniform mat4 uTransform;
|
||||||
/// A fixed scaling to be applied to the texture coordinates.
|
|
||||||
|
/// A pair of fixed scale factors to be applied to the texture coordinates.
|
||||||
uniform vec2 uTexScale;
|
uniform vec2 uTexScale;
|
||||||
|
|
||||||
/// The 2D vertex position.
|
/// The 2D vertex position.
|
||||||
attribute vec2 aPosition;
|
attribute vec2 aPosition;
|
||||||
|
|
||||||
/// The texture coordinate.
|
/// The texture coordinate.
|
||||||
attribute vec2 aTexCoord;
|
attribute vec2 aTexCoord;
|
||||||
|
|
||||||
/// The scaled texture coordinate.
|
/// The outgoing texture coordinate.
|
||||||
varying vec2 vTexCoord;
|
varying vec2 vTexCoord;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
Loading…
Reference in New Issue