Cleanup imgui shaders (#2476)

* Remove unused Imgui shaders

* Cleanup Imgui shaders position attribute
This commit is contained in:
Hugo Amnov
2021-04-18 20:39:42 +02:00
committed by GitHub
parent d8ef330967
commit 01b7fc0105
10 changed files with 1 additions and 172 deletions

View File

@@ -1,13 +0,0 @@
$input v_color0
/*
* Copyright 2011-2021 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
#include <bgfx_shader.sh>
void main()
{
gl_FragColor = v_color0;
}

View File

@@ -1,21 +0,0 @@
$input v_normal
/*
* Copyright 2011-2021 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
#include <bgfx_shader.sh>
uniform vec4 u_imageLodEnabled;
SAMPLERCUBE(s_texColor, 0);
#define u_imageLod u_imageLodEnabled.x
#define u_imageEnabled u_imageLodEnabled.y
void main()
{
vec3 color = textureCubeLod(s_texColor, v_normal, u_imageLod).xyz;
float alpha = 0.2 + 0.8*u_imageEnabled;
gl_FragColor = vec4(color, alpha);
}

View File

@@ -1,22 +0,0 @@
$input v_texcoord0
/*
* Copyright 2014 Dario Manesku. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
#include <bgfx_shader.sh>
uniform vec4 u_imageLodEnabled;
uniform vec4 u_swizzle;
SAMPLER2D(s_texColor, 0);
#define u_imageLod u_imageLodEnabled.x
#define u_imageEnabled u_imageLodEnabled.y
void main()
{
float color = dot(texture2DLod(s_texColor, v_texcoord0, u_imageLod), u_swizzle);
float alpha = 0.2 + 0.8*u_imageEnabled;
gl_FragColor = vec4(vec3_splat(color), alpha);
}

View File

@@ -1,38 +0,0 @@
$input v_texcoord0
/*
* Copyright 2014-2015 Dario Manesku. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
#include <bgfx_shader.sh>
uniform vec4 u_imageLodEnabled;
SAMPLERCUBE(s_texColor, 0);
#define u_imageLod u_imageLodEnabled.x
#define u_imageEnabled u_imageLodEnabled.y
vec3 vecFromLatLong(vec2 _uv)
{
float pi = 3.14159265;
float twoPi = 2.0*pi;
float phi = _uv.x * twoPi;
float theta = _uv.y * pi;
vec3 result;
result.x = -sin(theta)*sin(phi);
result.y = cos(theta);
result.z = -sin(theta)*cos(phi);
return result;
}
void main()
{
vec3 dir = vecFromLatLong(v_texcoord0);
vec3 color = textureCubeLod(s_texColor, dir, u_imageLod).xyz;
float alpha = 0.2 + 0.8*u_imageEnabled;
gl_FragColor = vec4(color, alpha);
}

View File

@@ -1,16 +0,0 @@
$input v_texcoord0, v_color0
/*
* Copyright 2011-2021 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
#include <bgfx_shader.sh>
SAMPLER2D(s_texColor, 0);
void main()
{
float alpha = texture2D(s_texColor, v_texcoord0).x;
gl_FragColor = vec4(v_color0.xyz, v_color0.w * alpha);
}

View File

@@ -2,7 +2,7 @@ vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0);
vec3 v_normal : NORMAL = vec3(0.0, 0.0, 1.0);
vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0);
vec3 a_position : POSITION;
vec2 a_position : POSITION;
vec4 a_normal : NORMAL;
vec4 a_color0 : COLOR0;
vec2 a_texcoord0 : TEXCOORD0;

View File

@@ -1,15 +0,0 @@
$input a_position, a_color0
$output v_color0
/*
* Copyright 2011-2021 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
#include <bgfx_shader.sh>
void main()
{
gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0) );
v_color0 = a_color0;
}

View File

@@ -1,15 +0,0 @@
$input a_position, a_normal
$output v_normal
/*
* Copyright 2011-2021 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
#include <bgfx_shader.sh>
void main()
{
gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) );
v_normal = a_normal.xyz;
}

View File

@@ -1,15 +0,0 @@
$input a_position, a_texcoord0
$output v_texcoord0
/*
* Copyright 2015 Dario Manesku. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
#include <bgfx_shader.sh>
void main()
{
gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) );
v_texcoord0 = a_texcoord0;
}

View File

@@ -1,16 +0,0 @@
$input a_position, a_texcoord0, a_color0
$output v_texcoord0, v_color0
/*
* Copyright 2011-2021 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
#include <bgfx_shader.sh>
void main()
{
gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0) );
v_texcoord0 = a_texcoord0;
v_color0 = a_color0;
}