mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
18 lines
390 B
Scala
18 lines
390 B
Scala
$input v_texcoord0
|
|
|
|
/*
|
|
* Copyright 2014 Dario Manesku. All rights reserved.
|
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
|
*/
|
|
|
|
#include <bgfx_shader.sh>
|
|
|
|
uniform float u_imageLod;
|
|
uniform vec4 u_swizzle;
|
|
SAMPLER2D(u_texColor, 0);
|
|
|
|
void main()
|
|
{
|
|
float color = dot(texture2DLod(u_texColor, v_texcoord0, u_imageLod), u_swizzle);
|
|
gl_FragColor = vec4(vec3_splat(color), 1.0);
|
|
}
|