mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-15 12:37:05 +02:00
Use defines for packed textures to satisfy both GLES and GL 4.1
This commit is contained in:
parent
993e1e1c4d
commit
dcdc3a323c
48 changed files with 95 additions and 95 deletions
|
@ -23,8 +23,8 @@
|
|||
<$declareEvalAmbientSphereGlobalColor(supportScattering)$>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=0) out vec4 _fragColor;
|
||||
|
||||
void main(void) {
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<$declareEvalAmbientSphereGlobalColor(isScattering)$>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=0) out vec4 _fragColor;
|
||||
|
||||
void main(void) {
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
<$declareEvalSkyboxGlobalColor(isScattering)$>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=0) out vec4 _fragColor;
|
||||
|
||||
void main(void) {
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<$declareEvalSkyboxGlobalColor(isScattering)$>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=0) out vec4 _fragColor;
|
||||
|
||||
void main(void) {
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
<$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, METALLIC, EMISSIVE, OCCLUSION)$>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
<$declareMaterialTextures(ALBEDO)$>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
||||
layout(location=0) out vec4 _fragColor0;
|
||||
|
|
|
@ -22,8 +22,8 @@ layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_MS) in vec3 _normalMS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_MS) in vec4 _positionMS;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@ layout(binding=0) uniform sampler2D originalTexture;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
|
||||
layout(location=0) out vec4 _fragColor0;
|
||||
|
|
|
@ -28,8 +28,8 @@ layout(binding=0) uniform sampler2D originalTexture;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
|
||||
layout(location=0) out vec4 _fragColor0;
|
||||
|
|
|
@ -24,8 +24,8 @@ layout(binding=0) uniform sampler2D originalTexture;
|
|||
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
|
||||
void main(void) {
|
||||
vec4 texel = texture(originalTexture, _texCoord0.st);
|
||||
|
|
|
@ -21,8 +21,8 @@ layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_MS) in vec3 _normalMS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_MS) in vec4 _positionMS;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ layout(std140, binding=0) uniform hudBuffer {
|
|||
};
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
|
||||
layout(location=0) out vec4 fragColor0;
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=0) out vec4 _fragColor;
|
||||
|
||||
void main(void) {
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
<@include render-utils/ShaderConstants.h@>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=0) out vec4 _fragColor;
|
||||
|
||||
void main(void) {
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
<$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, METALLIC, EMISSIVE, OCCLUSION, SCATTERING)$>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
<@include render-utils/ShaderConstants.h@>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
<$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, _SCRIBE_NULL, EMISSIVE, OCCLUSION)$>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
<@include render-utils/ShaderConstants.h@>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
<@include render-utils/ShaderConstants.h@>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
<@include render-utils/ShaderConstants.h@>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_TANGENT_WS) in vec3 _tangentWS;
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<@include render-utils/ShaderConstants.h@>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
||||
layout(location=0) out vec4 _fragColor;
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
<@include render-utils/ShaderConstants.h@>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<$declareMaterialTextures(ALBEDO)$>
|
||||
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ layout(location=0) out vec4 _color;
|
|||
void main(void) {
|
||||
_color = color;
|
||||
|
||||
float t = parabolicDistance * (floor(gl_VertexID / 2) / float(numSections));
|
||||
float t = parabolicDistance * (float(gl_VertexID / 2) / float(numSections));
|
||||
|
||||
vec4 pos = vec4(velocity * t + 0.5 * acceleration * t * t, 1);
|
||||
const float EPSILON = 0.00001;
|
||||
|
|
|
@ -20,8 +20,8 @@ layout(location=RENDER_UTILS_UNIFORM_TEXT_COLOR) uniform vec4 Color;
|
|||
// the interpolated normal
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
|
||||
#define TAA_TEXTURE_LOD_BIAS -3.0
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ layout(location=RENDER_UTILS_UNIFORM_TEXT_COLOR) uniform vec4 Color;
|
|||
// the interpolated normal
|
||||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
|
||||
const float gamma = 2.2;
|
||||
const float smoothing = 32.0;
|
||||
|
|
|
@ -21,8 +21,8 @@ layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_MS) in vec3 _normalMS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_MS) in vec4 _positionMS;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_MS) in vec3 _normalMS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_MS) in vec4 _positionMS;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
|
|
|
@ -24,8 +24,8 @@ layout(binding=0) uniform sampler2D originalTexture;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
|
||||
void main(void) {
|
||||
vec4 texel = texture(originalTexture, _texCoord0.st);
|
||||
|
|
|
@ -23,8 +23,8 @@ layout(binding=0) uniform sampler2D originalTexture;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
|
||||
void main(void) {
|
||||
vec4 texel = texture(originalTexture, _texCoord0);
|
||||
|
|
|
@ -26,8 +26,8 @@ layout(binding=0) uniform sampler2D originalTexture;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
|
||||
// Declare after all samplers to prevent sampler location mix up with originalTexture
|
||||
|
|
|
@ -24,8 +24,8 @@ layout(binding=0) uniform sampler2D originalTexture;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
|
||||
void main(void) {
|
||||
vec4 texel = texture(originalTexture, _texCoord0.st);
|
||||
|
|
|
@ -26,8 +26,8 @@ layout(binding=0) uniform sampler2D originalTexture;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
|
||||
// Declare after all samplers to prevent sampler location mix up with originalTexture
|
||||
|
|
|
@ -21,8 +21,8 @@ layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_MS) in vec3 _normalMS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_MS) in vec4 _positionMS;
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ layout(location=0) uniform sampler2D originalTexture;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
|
||||
void main(void) {
|
||||
vec4 texel = texture(originalTexture, _texCoord0);
|
||||
|
|
|
@ -32,8 +32,8 @@ layout(location=RENDER_UTILS_ATTR_POSITION_ES) in vec4 _positionES;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
|
||||
// Declare after all samplers to prevent sampler location mix up with originalTexture
|
||||
|
|
|
@ -21,8 +21,8 @@ layout(binding=0) uniform sampler2D originalTexture;
|
|||
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
|
||||
layout(location=0) out vec4 _fragColor0;
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ layout(binding=0) uniform sampler2D originalTexture;
|
|||
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
layout(location=RENDER_UTILS_ATTR_POSITION_WS) in vec4 _positionWS;
|
||||
|
||||
layout(location=0) out vec4 _fragColor0;
|
||||
|
|
|
@ -24,8 +24,8 @@ layout(binding=0) uniform sampler2D originalTexture;
|
|||
layout(location=RENDER_UTILS_ATTR_NORMAL_WS) in vec3 _normalWS;
|
||||
layout(location=RENDER_UTILS_ATTR_COLOR) in vec4 _color;
|
||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) in vec4 _texCoord01;
|
||||
vec2 _texCoord0 = _texCoord01.xy;
|
||||
vec2 _texCoord1 = _texCoord01.zw;
|
||||
#define _texCoord0 _texCoord01.xy
|
||||
#define _texCoord1 _texCoord01.zw
|
||||
|
||||
void main(void) {
|
||||
vec4 texel = texture(originalTexture, _texCoord0.st);
|
||||
|
|
Loading…
Reference in a new issue