go mod vendor pins onnxruntime_go v1.12.1, Gio and the rest into v2/vendor so go run/build work without hitting proxy.golang.org (blocked/slow in China). Verified: CGO_ENABLED=1 go build -mod=vendor ./internal/spike and GOOS=windows go build -mod=vendor ./internal/ui both pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
37 lines
811 B
Plaintext
37 lines
811 B
Plaintext
#version 150
|
|
|
|
struct Color
|
|
{
|
|
float emulateSRGB;
|
|
};
|
|
|
|
uniform Color _color;
|
|
|
|
uniform sampler2D tex;
|
|
|
|
in vec2 vUV;
|
|
out vec4 fragColor;
|
|
|
|
vec3 RGBtosRGB(vec3 rgb)
|
|
{
|
|
bvec3 cutoff = greaterThanEqual(rgb, vec3(0.003130800090730190277099609375));
|
|
vec3 below = vec3(12.9200000762939453125) * rgb;
|
|
vec3 above = (vec3(1.05499994754791259765625) * pow(rgb, vec3(0.416660010814666748046875))) - vec3(0.054999999701976776123046875);
|
|
return vec3(cutoff.x ? above.x : below.x, cutoff.y ? above.y : below.y, cutoff.z ? above.z : below.z);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec4 texel = texture(tex, vUV);
|
|
if (_color.emulateSRGB == 0.0)
|
|
{
|
|
vec3 param = texel.xyz;
|
|
vec3 _71 = RGBtosRGB(param);
|
|
texel.x = _71.x;
|
|
texel.y = _71.y;
|
|
texel.z = _71.z;
|
|
}
|
|
fragColor = texel;
|
|
}
|
|
|