mirror of
https://github.com/storytold/spark.git
synced 2026-10-17 00:12:59 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
precision highp float;
|
||||
precision highp int;
|
||||
precision highp sampler2D;
|
||||
precision highp usampler2D;
|
||||
precision highp isampler2D;
|
||||
precision highp sampler2DArray;
|
||||
precision highp usampler2DArray;
|
||||
precision highp isampler2DArray;
|
||||
precision highp sampler3D;
|
||||
precision highp usampler3D;
|
||||
precision highp isampler3D;
|
||||
|
||||
#include <splatDefines>
|
||||
|
||||
uniform uint targetLayer;
|
||||
uniform int targetBase;
|
||||
uniform int targetCount;
|
||||
|
||||
out uvec4 target;
|
||||
|
||||
{{ GLOBALS }}
|
||||
|
||||
void produceSplat(int index) {
|
||||
{{ STATEMENTS }}
|
||||
}
|
||||
|
||||
void main() {
|
||||
int targetIndex = int(targetLayer << SPLAT_TEX_LAYER_BITS) + int(uint(gl_FragCoord.y) << SPLAT_TEX_WIDTH_BITS) + int(gl_FragCoord.x);
|
||||
int index = targetIndex - targetBase;
|
||||
|
||||
if ((index >= 0) && (index < targetCount)) {
|
||||
produceSplat(index);
|
||||
} else {
|
||||
target = uvec4(0u, 0u, 0u, 0u);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user