commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
4.24k
new_contents
stringlengths
1
5.44k
subject
stringlengths
14
778
message
stringlengths
15
9.92k
lang
stringclasses
277 values
license
stringclasses
13 values
repos
stringlengths
5
127k
bc243d148f0ba7577e09a2dbe79b68a7d56ca33c
libs/yttrium/renderer/gl/2d_fs.glsl
libs/yttrium/renderer/gl/2d_fs.glsl
#version 330 in vec4 io_color; in vec2 io_texcoord; uniform sampler2D surface_texture; void main() { gl_FragColor = io_color * texture2D(surface_texture, io_texcoord); }
#version 330 in vec4 io_color; in vec2 io_texcoord; uniform sampler2D surface_texture; out vec4 o_color; void main() { o_color = io_color * texture(surface_texture, io_texcoord); }
Fix GLSL forward compatibility issues
Fix GLSL forward compatibility issues
GLSL
apache-2.0
blagodarin/yttrium,blagodarin/yttrium
39eb693d97e6c347aec05f3f9d523754bd4341a5
lib/ao.vsh
lib/ao.vsh
attribute vec4 attrib0; attribute vec4 attrib1; uniform mat4 projection; uniform mat4 view; uniform mat4 model; uniform float tileCount; varying vec3 normal; varying vec2 tileCoord; varying vec2 texCoord; varying float ambientOcclusion; void main() { //Compute position vec3 position = attrib0.xyz; //Comp...
attribute vec4 attrib0; attribute vec4 attrib1; uniform mat4 projection; uniform mat4 view; uniform mat4 model; uniform float tileCount; varying vec3 normal; varying vec2 tileCoord; varying vec2 texCoord; varying float ambientOcclusion; void main() { //Compute position vec3 position = attrib0.xyz; //Comp...
Read packed normal for mesher voxel format change
Read packed normal for mesher voxel format change Requires deathcap/voxel-mesher@56ab4142c5068abdf14aa6596eb620f7267db511 Ref https://github.com/mikolalysenko/ao-mesher/issues/4
GLSL
mit
voxel/voxel-shader
e9e2a82157f780bf4098c44ef26feee337a8f5a4
glsl/gol.frag
glsl/gol.frag
#ifdef GL_ES precision mediump float; #endif uniform sampler2D state; uniform vec2 scale; float get(vec2 offset) { return texture2D(state, (gl_FragCoord.xy + offset) / scale).r; } void main() { float current = get(vec2(0.0, 0.0)); float sum = get(vec2(-1.0, -1.0)) + get(vec2(-1.0, 0.0)) ...
#ifdef GL_ES precision mediump float; #endif uniform sampler2D state; uniform vec2 scale; int get(vec2 offset) { return int(texture2D(state, (gl_FragCoord.xy + offset) / scale).r); } void main() { int sum = get(vec2(-1.0, -1.0)) + get(vec2(-1.0, 0.0)) + get(vec2(-1.0, 1.0)) + ...
Use ints in the GoL shader.
Use ints in the GoL shader.
GLSL
unlicense
skeeto/webgl-game-of-life,skeeto/webgl-game-of-life
ab4a4f637a809b7bc9a66c5ec4d627e5d150f49c
resources/shaders/tools/ktx.frag
resources/shaders/tools/ktx.frag
#version 420 core #extension GL_ARB_shading_language_420pack : require in VS_OUT { vec2 uv; } fs_in; out vec4 out_color; uniform vec4 screenSize; layout(binding = 0) uniform sampler2D colorTexture; void main(void) { const vec2 image_size = textureSize(colorTexture, 0); const vec2 ratio = screenSize.xy...
#version 420 core #extension GL_ARB_shading_language_420pack : require in VS_OUT { vec2 uv; } fs_in; out vec4 out_color; uniform vec4 screenSize; layout(binding = 0) uniform sampler2D colorTexture; void main(void) { const vec2 image_size = textureSize(colorTexture, 0); const vec2 ratio = screenSize.xy...
Set alpha to 100 % opaque in KTX viewer to avoid glitches
tools: Set alpha to 100 % opaque in KTX viewer to avoid glitches Signed-off-by: onox <34c1d3d2d1347bea60a26f46574de21a7a79b6d5@gmail.com>
GLSL
apache-2.0
onox/orka
8f2e9c32331746b8fc61800683a4a263aa878e90
codehero/shaders/text_basic.frag
codehero/shaders/text_basic.frag
#version 330 core in vec2 TexCoords; in vec4 Color; out vec4 color; uniform sampler2D text; void main() { vec4 t = texture(text, TexCoords); if (t.r < 0.1) discard; color = vec4(Color.xyz, Color.w * t.r); }
#version 330 core in vec2 TexCoords; in vec4 Color; out vec4 color; uniform sampler2D text; void main() { vec4 t = texture(text, TexCoords); float a = Color.w * t.r; if (a < 0.1) discard; color = vec4(Color.xyz, a); }
Improve shader for UI and alpha handling
Improve shader for UI and alpha handling
GLSL
mit
pierrefourgeaud/CodeHero
cc390bbb0aa3bde3e1c0aa41f1e0d1a43e1c85d8
main/Makefile.frag
main/Makefile.frag
$(srcdir)/php_gtk_ext.c: $(srcdir)/php_gtk_ext.c.in $(builddir)/config.status @echo "creating main/php_gtk_ext.c" sh $(top_srcdir)/build2/genext.sh $(srcdir)/php_gtk_ext.c.in $(top_srcdir) "" $(AWK) $(PHP_GTK_EXTENSIONS) > $(srcdir)/php_gtk_ext.c cvsclean: @for i in `find . -name .cvsignore`; do \ (cd `dirname $...
$(srcdir)/php_gtk_ext.c: $(srcdir)/php_gtk_ext.c.in $(builddir)/config.status @echo "creating main/php_gtk_ext.c" sh $(top_srcdir)/build2/genext.sh $(srcdir)/php_gtk_ext.c.in $(top_srcdir) "" $(AWK) $(PHP_GTK_EXTENSIONS) > $(srcdir)/php_gtk_ext.c cvsclean: @for i in `find . -name .cvsignore`; do \ (cd `dirname $...
Add clean-gen and clean-caches targets.
Add clean-gen and clean-caches targets.
GLSL
lgpl-2.1
marcosptf/php-gtk-src,php/php-gtk-src,php/php-gtk-src,marcosptf/php-gtk-src,php/php-gtk-src,marcosptf/php-gtk-src,php/php-gtk-src,marcosptf/php-gtk-src,marcosptf/php-gtk-src,marcosptf/php-gtk-src,php/php-gtk-src,php/php-gtk-src
96ab562e090ccbc996857df23f3567a16f381e1b
codehero/shaders/textured.frag
codehero/shaders/textured.frag
#version 330 core #define NB_DIRECTIONAL_LIGHTS 1 #define NB_POINT_LIGHTS 1 in vec3 FragPos; in vec3 Normal; in vec2 TexCoords; out vec4 color; #include "lighting.frag" void main() { // Properties vec3 norm = normalize(Normal); vec3 viewDir = normalize(viewPos - FragPos); vec3 result; for(int ...
#version 330 core #define NB_DIRECTIONAL_LIGHTS 1 #define NB_POINT_LIGHTS 1 in vec3 FragPos; in vec3 Normal; in vec2 TexCoords; out vec4 color; #include "lighting.frag" void main() { // Properties vec3 norm = normalize(Normal); vec3 viewDir = normalize(viewPos - FragPos); vec3 result = vec3(0.0, 0...
Fix uninitialized variable in shader causing glitches from time to time (and code style)
Fix uninitialized variable in shader causing glitches from time to time (and code style)
GLSL
mit
pierrefourgeaud/CodeHero
94f33dc56691a8f375918d05dd6fa7ca3cdf998a
reference/shaders-msl/desktop-only/vert/shader-draw-parameters.desktop.vert
reference/shaders-msl/desktop-only/vert/shader-draw-parameters.desktop.vert
#include <metal_stdlib> #include <simd/simd.h> using namespace metal; struct main0_out { float4 gl_Position [[position]]; }; struct main0_in { uint gl_BaseVertex [[base_vertex]]; uint gl_BaseInstance [[base_instance]]; }; vertex main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; out...
#include <metal_stdlib> #include <simd/simd.h> using namespace metal; struct main0_out { float4 gl_Position [[position]]; }; vertex main0_out main0(uint gl_BaseVertex [[base_vertex]], uint gl_BaseInstance [[base_instance]]) { main0_out out = {}; out.gl_Position = float4(float(gl_BaseVertex), float(gl_Bas...
Fix MSL shader_draw_parameters reference output.
Fix MSL shader_draw_parameters reference output.
GLSL
apache-2.0
KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross
023d73eaddbc4baf43120ce1a573e3d4fdfd4d76
Source/Shaders/Builtin/Functions/alphaWeight.glsl
Source/Shaders/Builtin/Functions/alphaWeight.glsl
/** * @private */ float czm_alphaWeight(float a) { // See Weighted Blended Order-Independent Transparency for examples of different weighting functions: // http://jcgt.org/published/0002/02/09/ float z = czm_windowToEyeCoordinates(gl_FragCoord).z; return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 1...
/** * @private */ float czm_alphaWeight(float a) { // See Weighted Blended Order-Independent Transparency for examples of different weighting functions: // http://jcgt.org/published/0002/02/09/ // This function uses the fragment depth. The other functions in the paper are based on distance from the c...
Update weight function and fix 2D.
Update weight function and fix 2D.
GLSL
apache-2.0
wallw-bits/cesium,NaderCHASER/cesium,wallw-bits/cesium,YonatanKra/cesium,likangning93/cesium,hodbauer/cesium,ggetz/cesium,ggetz/cesium,kiselev-dv/cesium,geoscan/cesium,aelatgt/cesium,AnimatedRNG/cesium,jasonbeverage/cesium,emackey/cesium,oterral/cesium,likangning93/cesium,progsung/cesium,AnimatedRNG/cesium,aelatgt/cesi...
007e7219f86511b93e6f1b6b8e632339be8b7941
resources/library/effects/filmstop.glsl
resources/library/effects/filmstop.glsl
#property description De-sync the shutter and the film feed void main(void) { // Lookup what offset to display the picture at float offset = texture(iChannel[1], vec2(0.5, 0.5)).r; // Display the frame from iChannel[2] at that offset vec4 c = texture(iChannel[2], mod(uv + vec2(0., offset), 1.)); ...
#property description De-sync the shutter and the film feed void main(void) { // Lookup what offset to display the picture at float offset = texture(iChannel[1], vec2(0.5, 0.5)).r; // Display the frame from iChannel[2] at that offset vec4 c = texture(iChannel[2], mod(uv + vec2(0., offset), 1.)); ...
Stop film in direction of travel
Stop film in direction of travel
GLSL
mit
zbanks/radiance,zbanks/radiance,zbanks/radiance,zbanks/radiance
3ab4d6c79d2da91e548658b8bd75e50e4f2c6065
demo/textured-blender-fault-cube/shader/vertex.glsl
demo/textured-blender-fault-cube/shader/vertex.glsl
attribute vec3 aVertexPosition; attribute vec2 aWeight; attribute float aJointIndex; attribute float aJointWeight; uniform mat4 uMVMatrix; uniform mat4 uPMatrix; uniform mat4 boneMatrices[2]; void main (void) { float foo = aJointIndex + aJointWeight; gl_Position = uPMatrix * uMVMatrix * boneMatrices[1] * vec4(a...
attribute vec3 aVertexPosition; attribute vec2 aWeight; attribute float aJointIndex; attribute float aJointWeight; uniform mat4 uMVMatrix; uniform mat4 uPMatrix; uniform mat4 boneMatrices[2]; void main (void) { mat4 jointMatrix; if (aJointIndex < 1.0) { jointMatrix = boneMatrices[0]; } else if (aJointInde...
Use the right joints in the shader
Use the right joints in the shader ANIMATION !!!
GLSL
mit
chinedufn/collada-dae-parser
7d0d492a6606814b0273bfecaa0ea3c746e1ca85
renderdoc/data/glsl/pixelhistory_primid.frag
renderdoc/data/glsl/pixelhistory_primid.frag
#include "glsl_globals.h" IO_LOCATION(0) out vec4 color_out; void main(void) { color_out = intBitsToFloat(gl_PrimitiveID).xxxx; }
/****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2020 Baldur Karlsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the ...
Add missing copyright statement in shader
Add missing copyright statement in shader
GLSL
mit
Zorro666/renderdoc,baldurk/renderdoc,baldurk/renderdoc,baldurk/renderdoc,baldurk/renderdoc,Zorro666/renderdoc,baldurk/renderdoc,baldurk/renderdoc,Zorro666/renderdoc,Zorro666/renderdoc,Zorro666/renderdoc,Zorro666/renderdoc
8fa3bad3785ddaadd45415947c4b51dac260f3fd
MatCapShaders/assets/shaders/matcap_frag.glsl
MatCapShaders/assets/shaders/matcap_frag.glsl
#version 150 uniform sampler2D image; in vec3 cI; // incident ray, camera space in vec3 cN; // normal, camera space out vec4 fragColor; void main() { vec3 r = reflect( cI, cN ); float m = 2.0 * sqrt( pow( r.x, 2.0 ) + pow( r.y, 2.0 ) + pow( r.z + 1., 2.0 ) ); vec2 vN = r.xy / m + 0.5; fragColor = ...
#version 150 uniform sampler2D image; in vec3 cI; // incident ray, camera space in vec3 cN; // normal, camera space out vec4 fragColor; void main() { vec3 r = reflect( cI, cN ); r.z += 1.0; float m = 0.5 * inversesqrt( dot( r, r ) ); vec2 uv = r.xy * m + 0.5; fragColor = vec4( texture( image, uv ).rgb, 1.0 );...
Refactor of matcap fragment shader.
Refactor of matcap fragment shader.
GLSL
mit
WhileRomeBurns/CinderExperiments,WhileRomeBurns/CinderExperiments
8e87fc7eb513f671a5cc364962f86a76831cb461
core/resources/shaders/rasters.glsl
core/resources/shaders/rasters.glsl
#ifdef TANGRAM_FRAGMENT_SHADER uniform sampler2D u_rasters[TANGRAM_NUM_RASTER_SOURCES]; uniform vec2 u_raster_sizes[TANGRAM_NUM_RASTER_SOURCES]; uniform vec3 u_raster_offsets[TANGRAM_NUM_RASTER_SOURCES]; #define currentRasterUV(raster_index) \ (v_modelpos_base_zoom.xy) #define sampleRaster(raster_index) \ (t...
#ifdef TANGRAM_FRAGMENT_SHADER uniform sampler2D u_rasters[TANGRAM_NUM_RASTER_SOURCES]; uniform vec2 u_raster_sizes[TANGRAM_NUM_RASTER_SOURCES]; uniform vec3 u_raster_offsets[TANGRAM_NUM_RASTER_SOURCES]; // TODO #define adjustRasterUV(raster_index, uv) \ (uv) #define currentRasterUV(raster_index) \ (v_modelp...
Add pixel sampler/raster size shader accesors
Add pixel sampler/raster size shader accesors
GLSL
mit
tangrams/tangram-es,cleeus/tangram-es,tangrams/tangram-es,tangrams/tangram-es,quitejonny/tangram-es,cleeus/tangram-es,tangrams/tangram-es,tangrams/tangram-es,quitejonny/tangram-es,quitejonny/tangram-es,quitejonny/tangram-es,cleeus/tangram-es,tangrams/tangram-es,quitejonny/tangram-es,cleeus/tangram-es,quitejonny/tangram...
89df2e5dc883a2deb2900af9024af154e80fc4dc
ext/gtk+/Makefile.frag
ext/gtk+/Makefile.frag
COMMONDEFS=$(srcdir)/gtk-types.defs $(srcdir)/gdk-types.defs \ $(srcdir)/atk-types.defs $(srcdir)/pango-types.defs GTK_OVERRIDES = \ $(srcdir)/gtk.overrides \ $(srcdir)/gtkstyle.overrides $(srcdir)/gen_gtk.c: $(srcdir)/gtk.defs $(COMMONDEFS) $(srcdir)/gtk-extrafuncs.defs $(GTK_OVERRIDES) $(srcdir)/gen_gdk.c: $...
COMMONDEFS=$(srcdir)/gtk-types.defs $(srcdir)/gdk-types.defs \ $(srcdir)/atk-types.defs $(srcdir)/pango-types.defs GTK_OVERRIDES = \ $(srcdir)/gtk.overrides \ $(srcdir)/gtkstyle.overrides $(srcdir)/gen_gtk.c: $(srcdir)/gtk.defs $(COMMONDEFS) $(srcdir)/gtk-extrafuncs.defs $(GTK_OVERRIDES) $(srcdir)/gen_gdk.c: $...
Fix generation error that resulted in a wrong header file being created.
Fix generation error that resulted in a wrong header file being created.
GLSL
lgpl-2.1
ewiger/php-gtk,ewiger/php-gtk,ewiger/php-gtk,ewiger/php-gtk,ewiger/php-gtk,ewiger/php-gtk
b803095d83a1df2da15efde2f61335a0e64b8ab2
data/shaders/vertex/brightness-displace-sheet-vert.glsl
data/shaders/vertex/brightness-displace-sheet-vert.glsl
uniform mat4 transform; uniform mat4 texMatrix; uniform mat3 normalMatrix; uniform sampler2D displacementMap; uniform float displaceStrength; attribute vec4 vertex; attribute vec4 color; attribute vec2 texCoord; attribute vec3 normal; varying vec4 vertColor; varying vec4 vertTexCoord; varying vec3 vertNormal; varyi...
uniform mat4 transform; uniform mat4 texMatrix; uniform mat3 normalMatrix; uniform sampler2D displacementMap; uniform float displaceStrength; attribute vec4 vertex; attribute vec4 color; attribute vec2 texCoord; attribute vec3 normal; varying vec4 vertColor; varying vec4 vertTexCoord; varying vec3 vertNormal; varyi...
Clean up w/Marc & Jeremy
Clean up w/Marc & Jeremy
GLSL
mit
cacheflowe/haxademic,cacheflowe/haxademic,cacheflowe/haxademic,cacheflowe/haxademic,cacheflowe/haxademic,cacheflowe/haxademic
33abee0100409ba6171d35da9b76abaacaece095
share/glsl/vmanifold.glsl
share/glsl/vmanifold.glsl
/* #include "perspective.glsl" */ uniform float noise_amplitude; uniform vec2 noise_freq; varying float scaled_noise_amplitude; void main() { vec4 proj; vec2 texc; proj = perspective_proj(gl_Vertex); gl_Position = gl_ModelViewProjectionMatrix * proj; texc = gl_Vertex.xy / METRE / 4.0f; texc.s += gl_Vert...
/* #include "perspective.glsl" */ uniform float noise_amplitude; uniform vec2 noise_freq; varying float scaled_noise_amplitude; void main() { vec4 proj; vec2 texc; proj = perspective_proj(gl_Vertex); gl_Position = gl_ModelViewProjectionMatrix * proj; texc = gl_Vertex.xy / METRE / 4.0f; texc.s += gl_Vert...
Fix manifold noise amplitude calculation.
Fix manifold noise amplitude calculation.
GLSL
bsd-3-clause
AltSysrq/mantigraphia,AltSysrq/mantigraphia
6f1ee7d8fb3fa3d784c89a5e7a4d6946d3168479
Samples/Media/materials/programs/GLSL400/TesselationTd.glsl
Samples/Media/materials/programs/GLSL400/TesselationTd.glsl
#version 400 core uniform mat4 g_mWorldViewProjection; // GLSL tessellation evaluation shader (domain shader in HLSL). layout(triangles, equal_spacing, cw) in; void main() { // Baricentric interpolation vec3 finalPos = (gl_TessCoord.x * gl_in[0].gl_Position + gl_TessCoord.y * gl_in[1].gl_Position + gl_TessCoo...
#version 400 core uniform mat4 g_mWorldViewProjection; // GLSL tessellation evaluation shader (domain shader in HLSL). layout(triangles, equal_spacing, cw) in; void main() { // Baricentric interpolation vec3 finalPos = vec3(gl_TessCoord.x * gl_in[0].gl_Position + gl_TessCoord.y * gl_...
Fix implicit vec 3 to vec4 conversion in Tessellation sample GLSL shader
[samples] Fix implicit vec 3 to vec4 conversion in Tessellation sample GLSL shader --HG-- branch : v1-10
GLSL
mit
jhu-lcsr-forks/ogre,jhu-lcsr-forks/ogre,jhu-lcsr-forks/ogre,jhu-lcsr-forks/ogre,jhu-lcsr-forks/ogre
f5fa06b8357a9c245ad5dfaaa95839feeed9b1ec
demos/trillium.glsl
demos/trillium.glsl
// @program p_simple, vertex, fragment uniform mat4 u_mvp; -- vertex attribute vec4 a_position; void main() { vec4 p = a_position; p.xy -= 0.5; p.y *= -1.0; gl_Position = u_mvp * p; } -- fragment void main() { gl_FragColor = vec4(0.2, 0.2, 0.2, 1.0); }
// @program p_simple, vertex, fragment uniform mat4 u_mvp; -- vertex attribute vec4 a_position; void main() { vec4 p = a_position; p.xy -= 0.5; p.y *= -1.0; gl_Position = u_mvp * p; gl_PointSize = 2.0; } -- fragment void main() { gl_FragColor = vec4(0.2, 0.2, 0.2, 1.0); }
Fix point size on web.
Fix point size on web.
GLSL
mit
prideout/parg,prideout/parg,prideout/parg,prideout/parg,prideout/parg,prideout/parg
cf306cea6618ec142b07f4b7571439fc03b04d20
source/shader/procedural.frag
source/shader/procedural.frag
#version 140 #extension GL_ARB_shading_language_include : enable #extension GL_ARB_explicit_attrib_location : enable layout(location = 0) out vec4 color; in vec2 position; uniform ivec2 windowSize; // The symbols below will be auto-replaced #textures #includes void main() { vec4 sphereData = sphere(position, ve...
#version 140 #extension GL_ARB_shading_language_include : enable #extension GL_ARB_explicit_attrib_location : enable layout(location = 0) out vec4 color; in vec2 position; uniform ivec2 windowSize; // The symbols below will be auto-replaced #id #textures #includes void main() { vec4 sphereData = sphere(position...
Add phong shading example to main shader
Add phong shading example to main shader
GLSL
mit
simonkrogmann/procedural,simonkrogmann/procedural
d834a416511424f54b625e20dc36c6d5fc00d5b4
Resources/gles2.bundle/Shaders/NoLightingTextureAlpha.fsh
Resources/gles2.bundle/Shaders/NoLightingTextureAlpha.fsh
#ifdef GL_ES precision highp float; #endif varying vec2 v_texcoord0; varying vec4 v_color; uniform sampler2D u_texture0; void main() { gl_FragColor = v_color * vec4(v_color.rgb, texture2D(u_texture0, v_texcoord0).a); }
#ifdef GL_ES precision highp float; #endif varying vec2 v_texcoord0; varying vec4 v_color; uniform sampler2D u_texture0; void main() { gl_FragColor = vec4(v_color.rgb, texture2D(u_texture0, v_texcoord0).a); }
Remove erroneous squaring of fragment color in texture shader
Remove erroneous squaring of fragment color in texture shader
GLSL
mit
graphstorm/graphstorm,graphstorm/graphstorm
52ee22ae7f12b2fb702d53b4d9c9ce2c8fa0681c
scripts/frag/10-start.frag
scripts/frag/10-start.frag
// Begin! (function (root, factory) { if (typeof define === 'function' && define.amd) { define('bic', [ 'feature!promises', 'jquery', 'underscore', 'backbone', 'mustache', 'BlinkForms', 'jquerymobile', 'BMP.Blobs...
// Begin! (function (root, factory) { if (typeof define === 'function' && define.amd) { define('bic', [ 'feature!promises', 'jquery', 'underscore', 'backbone', 'mustache', 'BlinkForms', 'jquerymobile', 'BMP.Blobs...
Fix to get the BlinkGap helper library working with PollUntil
Fix to get the BlinkGap helper library working with PollUntil
GLSL
bsd-3-clause
blinkmobile/bic-jqm,blinkmobile/bic-jqm
7cd51e51add5d6682ef7535b9bce454043b2dad3
dali-toolkit/internal/graphics/shaders/text-scroller-shader.vert
dali-toolkit/internal/graphics/shaders/text-scroller-shader.vert
attribute mediump vec2 aPosition; varying highp vec2 vTexCoord; uniform highp vec3 uSize; uniform mediump float uDelta; uniform mediump vec2 uTextureSize; uniform mediump float uGap; uniform mediump float uHorizontalAlign; uniform mediump float uVerticalAlign; uniform highp mat4 uMvpMatrix; //Visual size and offset u...
attribute mediump vec2 aPosition; varying highp vec2 vTexCoord; uniform highp vec3 uSize; uniform highp float uDelta; uniform mediump vec2 uTextureSize; uniform highp float uGap; uniform mediump float uHorizontalAlign; uniform mediump float uVerticalAlign; uniform highp mat4 uMvpMatrix; //Visual size and offset unifo...
Fix visual defect during text scroll
Fix visual defect during text scroll Change-Id: Idf9d2f3bbf08dcb0832b1493ce9c3526f12440ae Signed-off-by: Eunki, Hong <301831f1139537c1cbbc3eb529a9eda692d8c1bb@samsung.com>
GLSL
apache-2.0
dalihub/dali-toolkit,dalihub/dali-toolkit,dalihub/dali-toolkit,dalihub/dali-toolkit
974a9733709552ddb3767969c3caab9338a12e58
plugins/compositing_gl/shaders/comp/assao/LoadNormalOffset.glsl
plugins/compositing_gl/shaders/comp/assao/LoadNormalOffset.glsl
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2016, Intel Corporation // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated // documentation files (the "Software"), to dea...
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2016, Intel Corporation // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated // documentation files (the "Software"), to dea...
Fix shader compiler error "offset needs to be a constant"
Fix shader compiler error "offset needs to be a constant"
GLSL
bsd-3-clause
UniStuttgart-VISUS/megamol,UniStuttgart-VISUS/megamol,UniStuttgart-VISUS/megamol,UniStuttgart-VISUS/megamol,UniStuttgart-VISUS/megamol
bd6f8a01a504ab0f8751ddd040d0199b69896712
src/shader/textureForRenderBuffer.frag
src/shader/textureForRenderBuffer.frag
#version 440 in vec2 vertexTexCoord; uniform sampler2D textureSampler; uniform vec4 backgroundColor = vec4(0.8, 0.8, 0.8, 1); out vec4 color; vec4 blend(vec4 clr, vec4 srf) { return clr + (1.0 - clr.w) * vec4(srf.xyz * srf.w, srf.w); } void main() { color = blend( texture(textureSampler, vec2(vertexTexCo...
#version 440 in vec2 vertexTexCoord; uniform sampler2D textureSampler; uniform vec4 backgroundColor = vec4(1, 1, 1, 1); out vec4 color; vec4 blend(vec4 clr, vec4 srf) { return clr + (1.0 - clr.w) * vec4(srf.xyz * srf.w, srf.w); } void main() { color = blend( texture(textureSampler, vec2(vertexTexCoord.x,...
Use white background also in single layer renderings.
Use white background also in single layer renderings. So that the debug views can be compared to the overall result.
GLSL
mit
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
b51b390860d0607b89e884cc56c5612aee4126de
res/fshader.glsl
res/fshader.glsl
#version 330 in vec3 f_color; in vec4 f_normal; in vec2 f_uv; layout(location = 0) out vec4 diffuse; layout(location = 1) out vec4 normal; void main(){ diffuse = vec4(f_color, 1.f); //Scale the normal values from [-1,1] range to [0,1] range normal = ((f_normal - vec4(-1.f, -1.f, -1.f, 0.f) / 2.f)); }
#version 330 in vec3 f_color; in vec4 f_normal; in vec2 f_uv; layout(location = 0) out vec4 diffuse; layout(location = 1) out vec4 normal; void main(){ diffuse = vec4(f_color, 1.f); //Scale the normal values from [-1,1] range to [0,1] range normal = ((f_normal - vec4(-1.f, -1.f, -1.f, 0.f) / 2.f)); normal.w = 1....
Set normal alpha color to 1.f
Set normal alpha color to 1.f
GLSL
mit
Twinklebear/Deferred-Rendering,Twinklebear/Deferred-Rendering
aad09aa3a7f6a13a99aa405465a608548a43380a
Source/Shaders/Builtin/Functions/alphaWeight.glsl
Source/Shaders/Builtin/Functions/alphaWeight.glsl
/** * @private */ float czm_alphaWeight(float z, float a) { // See Weighted Blended Order-Independent Transparency for examples of different weighting functions: // http://jcgt.org/published/0002/02/09/ return clamp(0.5 / 1e-5 + pow(abs(z) / 200.0, 6.0), 1e-2, 3e-3); }
/** * @private */ float czm_alphaWeight(float z, float a) { // See Weighted Blended Order-Independent Transparency for examples of different weighting functions: // http://jcgt.org/published/0002/02/09/ return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 100.0 / (1e-5 + pow(abs(z) / 10.0, 3.0) + pow(abs(...
Change weight function yet again. This looks better with outlined geometry.
Change weight function yet again. This looks better with outlined geometry.
GLSL
apache-2.0
jasonbeverage/cesium,ggetz/cesium,NaderCHASER/cesium,AnimatedRNG/cesium,omh1280/cesium,aelatgt/cesium,CesiumGS/cesium,omh1280/cesium,kiselev-dv/cesium,hodbauer/cesium,soceur/cesium,emackey/cesium,esraerik/cesium,aelatgt/cesium,progsung/cesium,CesiumGS/cesium,esraerik/cesium,geoscan/cesium,wallw-bits/cesium,CesiumGS/ces...
46f267700f4bf6b922a99b75142711a775cb30e9
libraries/effect/src/main/assets/shaders/fragment_shader_contrast_es2.glsl
libraries/effect/src/main/assets/shaders/fragment_shader_contrast_es2.glsl
#version 100 // Copyright 2022 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required ...
#version 100 // Copyright 2022 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required ...
Remove clamp function in contrast fragment shader.
Remove clamp function in contrast fragment shader. * OpenGL automatically clamps the output colors to the [0, 1] interval. PiperOrigin-RevId: 465071999 (cherry picked from commit 2347db5d7484b161f6389846e6cde5b0ac1ed7a6)
GLSL
apache-2.0
androidx/media,androidx/media,androidx/media
1ad5eb8a7ff65ad78f9c471f1b7ff4196f23e264
assets/shaders/texture_plane.frag
assets/shaders/texture_plane.frag
#version 310 es precision mediump float; layout(location = 0) in highp vec2 vUV; layout(location = 0) out vec3 Emissive; layout(location = 1) out vec4 BaseColor; layout(location = 2) out vec3 Normal; layout(location = 3) out vec2 PBR; layout(set = 2, binding = 0) uniform sampler2D uReflection; layout(std430, push_c...
#version 310 es precision mediump float; layout(location = 0) in highp vec2 vUV; layout(location = 0) out vec3 Emissive; layout(location = 1) out vec4 BaseColor; layout(location = 2) out vec3 Normal; layout(location = 3) out vec2 PBR; layout(set = 2, binding = 0) uniform sampler2D uReflection; layout(std430, push_c...
Use no albedo for water plane.
Use no albedo for water plane.
GLSL
mit
Themaister/Granite,Themaister/Granite,Themaister/Granite,Themaister/Granite,Themaister/Granite,Themaister/Granite
54ba7e254d1958ffce7dc808d447566b868b4db3
share/glsl/fterrabuff.glsl
share/glsl/fterrabuff.glsl
varying float rel; varying vec2 screen_coords; uniform sampler2D hmap, tex; uniform float ty_below; uniform float line_thickness; uniform vec2 screen_size; void main() { float low, high; float value; float thickness; if (gl_TexCoord[0].t > 1) thickness = line_thickness; else thickness = max(1.0f, li...
varying float rel; varying vec2 screen_coords; uniform sampler2D hmap, tex; uniform float ty_below; uniform float line_thickness; uniform vec2 screen_size; void main() { float low, high; float value; float thickness; if (gl_TexCoord[0].t > 1) thickness = line_thickness; else thickness = max(1.0f, li...
Fix hole in terrabuff when looking directly down.
Fix hole in terrabuff when looking directly down.
GLSL
bsd-3-clause
AltSysrq/mantigraphia,AltSysrq/mantigraphia
cd5b03853872b352752cc2bbad3ec9e5ae7ce2ea
RWXViewer/Content/Shaders/vertexShader.glsl
RWXViewer/Content/Shaders/vertexShader.glsl
// Copyright 2014 Joshua R. Rodgers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
// Copyright 2014 Joshua R. Rodgers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
Normalize the light direction to reduce issues with the light being overly intense.
Normalize the light direction to reduce issues with the light being overly intense.
GLSL
apache-2.0
Bloyteg/RWXViewer,Bloyteg/RWXViewer,Bloyteg/RWXViewer,Bloyteg/RWXViewer
fe404534442a65330e50c0913b07632b9ad48471
Makefile.frag
Makefile.frag
$(SAPI_PCONN_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(BUILD_PCONN)
$(SAPI_PCONN_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(PHP_PCONN_OBJS) $(BUILD_PCONN)
Add PCONN objects to build instruction
Add PCONN objects to build instruction
GLSL
bsd-3-clause
johannes/pconn-sapi,ilk33r/pconn-sapi,johannes/pconn-sapi,johannes/pconn-sapi,ilk33r/pconn-sapi,ilk33r/pconn-sapi
28c213df46401cbe4432120b5cc38372bdcff748
web-client/src/main/java/uk/co/thinkofdeath/mapviewer/client/render/shaders/chunk_fragment.glsl
web-client/src/main/java/uk/co/thinkofdeath/mapviewer/client/render/shaders/chunk_fragment.glsl
precision mediump float; uniform sampler2D textures[5]; varying vec4 vColour; varying vec2 vTexturePos; varying vec2 vTextureOffset; varying float vLighting; varying float vTextureSize; varying float texture; void main(void) { vec4 colour = vec4(0.0); vec2 pos = vTexturePos + fract(vTextureOffset) * vTexture...
precision mediump float; uniform sampler2D textures[5]; varying vec4 vColour; varying vec2 vTexturePos; varying vec2 vTextureOffset; varying float vLighting; varying float vTextureSize; varying float texture; void main(void) { vec4 colour = vec4(0.0); vec2 pos = vTexturePos + fract(vTextureOffset) * vTexture...
Fix typo in the fragment shader
Fix typo in the fragment shader
GLSL
apache-2.0
thinkofdeath/ThinkMap,thinkofdeath/ThinkMap,thinkofdeath/ThinkMap
5c6139b8933e893bf10d36e2efe887e6d227aa27
config/wrap-end.frag
config/wrap-end.frag
// The return value from here will be assigned to window.Livefyre var Livefyre = window.Livefyre || {}; // We only have an async reference to the Livefyre.js object... // So define it here as something special Livefyre.require = function () { var args = arguments; var self = this; ...
// The return value from here will be assigned to window.Livefyre var Livefyre = window.Livefyre || {}; require(['Livefyre'], function (LivefyreJS) { for (var key in LivefyreJS) { Livefyre[key] = LivefyreJS[key]; } }); // We only have an async reference to the Livefyre...
Build frag end exports all keys from LivefyreJS/main onto window.Livefyre
Build frag end exports all keys from LivefyreJS/main onto window.Livefyre
GLSL
mit
Livefyre/Livefyre.js,gobengo/Livefyre.js,Livefyre/Livefyre.js
8abe2a92043d2363264584620652fe8de6fbe6eb
exercises/00-intro-0/files/hello.glsl
exercises/00-intro-0/files/hello.glsl
float brightness() { return 0.0; } //Do not change this line #pragma glslify: export(brightness)
float brightness() { return -1.0; } //Do not change this line #pragma glslify: export(brightness)
Fix shader file in 00-intro-0
Fix shader file in 00-intro-0 Fixes #45. Thanks @justinabrahms!
GLSL
mit
zhakui/shader-school,sksullivan/shader-school,Heart2009/shader-school,sksullivan/shader-school,zhakui/shader-school,Heart2009/shader-school,stackgl/shader-school,sksullivan/shader-school,stackgl/shader-school
5e5fc020f25949607a7021caa61239ba9fae98ef
ressources/shaders/screenquad.frag
ressources/shaders/screenquad.frag
#version 330 // Input: UV coordinates in INTERFACE { vec2 uv; } In ; // Uniforms: the texture, inverse of the screen size, FXAA flag. uniform sampler2D screenTexture; uniform vec2 inverseScreenSize; uniform bool useFXAA; // Output: the fragment color out vec3 fragColor; void main(){ vec3 colorCenter = texture(...
#version 330 // Input: UV coordinates in INTERFACE { vec2 uv; } In ; // Uniforms: the texture, inverse of the screen size, FXAA flag. uniform sampler2D screenTexture; uniform vec2 inverseScreenSize; uniform bool useFXAA; // Output: the fragment color out vec3 fragColor; // Return the luma value in perceptual space...
Add a function to compute perceptual luma.
Add a function to compute perceptual luma. The luma can be seen as a perceived intensity. This is the reason why the coefficients in its computations give more importance to the green channel, as our eye is most sensitive to the green wavelengths. Former-commit-id: 685c3d023247119a621f8b2c5f896ebe6ba3acb7
GLSL
mit
kosua20/GL_Template,kosua20/GL_Template
93233b79bc14b7cc78f8263d10188868c90c36bc
shaders/Font.vert
shaders/Font.vert
/* Text rendering - Vertex Shader */ #version 400 layout(location = 0) in vec2 vertexPosition; layout(location = 1) in vec2 vertexTexture; uniform vec2 position; uniform vec2 size; uniform vec2 uv1; uniform vec2 uv2; out VertexData { vec2 texCoords; } vertexOut; void main () { //vertexOut.tex_coords = vertex_posi...
/* Text rendering - Vertex Shader */ #version 400 layout(location = 0) in vec2 vertexPosition; layout(location = 1) in vec2 vertexTexture; uniform vec2 position; uniform vec2 size; uniform vec2 uv1; uniform vec2 uv2; out VertexData { vec2 texCoords; } vertexOut; void main () { vertexOut.texCoords.x = uv1.x ...
Fix font rendering winding order.
Fix font rendering winding order.
GLSL
mit
Chainsawkitten/HymnToBeauty,Chainsawkitten/LargeGameProjectEngine,Chainsawkitten/HymnToBeauty,Chainsawkitten/LargeGameProjectEngine
c34efd2b83f829db86f0d5c322275eb60cd2d448
src/FragmentShader.glsl
src/FragmentShader.glsl
#pragma glslify: applyMaterial = require(./chunks/applyMaterial) #pragma glslify: applyLight = require(./chunks/applyLight) void main() { vec3 material = baseColor.r >= 0.0 ? baseColor : applyMaterial(baseColor); bool flatShading = u_FlatShading > 0.0; bool lights = length(u_LightColor) > 0.0; vec3 co...
#pragma glslify: applyMaterial = require(./chunks/applyMaterial) #pragma glslify: applyLight = require(./chunks/applyLight) void main() { vec3 material = baseColor.r >= 0.0 ? baseColor : applyMaterial(baseColor); bool flatShading = u_FlatShading > 0.0; bool lights = length(u_LightColor) > 0.0; vec3 co...
Update ambient to account for flat shading
Fix: Update ambient to account for flat shading
GLSL
mit
CedarLogic/engine,mcanthony/engine,Morgantheplant/engine,codesdk/engine,noikiy/engine,beni55/engine,steveblue/engine,infamous/engine,talves/famous-engine,Morgantheplant/engine,redwoodfavorite/engine,arunabhdas/engine,Famous/engine,TheAlphaNerd/engine,artichox/engine,alexanderGugel/engine,codesdk/engine,woltemade/engine...
cfe8443ba58c984060819dad5a9017c310f11763
vcl/opengl/solidVertexShader.glsl
vcl/opengl/solidVertexShader.glsl
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozil...
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozil...
Remove the extra colon at the end of shader
vcl: Remove the extra colon at the end of shader Change-Id: I0a1a2346176a9f2f4d62ca80a9485d720b522cef
GLSL
mpl-2.0
JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core
426d89734853a223fb853850e6b0387e87b42437
share/shaders/softShadows/VSM/generate_depth_texture.vert
share/shaders/softShadows/VSM/generate_depth_texture.vert
#version 120 uniform vec4 u_lightType; varying vec4 lightVec; void main() { vec4 lp; //lp = lightPosition; //lp = vec4(0.0,0.0,0.0,1.0); vec4 ecPos = gl_ModelViewMatrix * gl_Vertex; if(u_lightType == 0) lightVec = vec4(0.0, 0.0, ecPos.z, 0.0);//vec4(ecPos.xyz - vec3(ecPos.xy,0.0), 0.0); else // if(u_ligh...
#version 120 uniform int u_lightType; varying vec4 lightVec; void main() { vec4 lp; //lp = lightPosition; //lp = vec4(0.0,0.0,0.0,1.0); vec4 ecPos = gl_ModelViewMatrix * gl_Vertex; if(u_lightType == 0) lightVec = vec4(0.0, 0.0, ecPos.z, 0.0);//vec4(ecPos.xyz - vec3(ecPos.xy,0.0), 0.0); else // if(u_light...
Fix compilation (in generateDepth shader)
[SofaOpenGLVisual] Fix compilation (in generateDepth shader)
GLSL
lgpl-2.1
FabienPean/sofa,FabienPean/sofa,hdeling/sofa,Anatoscope/sofa,Anatoscope/sofa,Anatoscope/sofa,hdeling/sofa,Anatoscope/sofa,hdeling/sofa,hdeling/sofa,FabienPean/sofa,hdeling/sofa,hdeling/sofa,hdeling/sofa,Anatoscope/sofa,FabienPean/sofa,FabienPean/sofa,FabienPean/sofa,FabienPean/sofa,FabienPean/sofa,Anatoscope/sofa,Anato...
e2b97e3faf6fecd9239214b703b9a3cd60f50dd3
indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
/** * @file impostorF.glsl * * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. * $License$ */ uniform sampler2D diffuseMap; uniform sampler2D normalMap; uniform sampler2D specularMap; void main() { gl_FragData[0] = texture2D(diffuseMap, gl_TexCoord[0].xy); gl_FragData[1] = texture2D(specularMap, gl_T...
/** * @file impostorF.glsl * * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. * $License$ */ uniform sampler2D diffuseMap; uniform sampler2D normalMap; uniform sampler2D specularMap; void main() { vec4 col = texture2D(diffuseMap, gl_TexCoord[0].xy); gl_FragData[0] = vec4(col.rgb, col.a <= 0.5 ? 0.0 ...
Fix for impostors being fullbright when deferred rendering enabled.
Fix for impostors being fullbright when deferred rendering enabled.
GLSL
lgpl-2.1
gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm
52791777d4fac542c1432729d5bd9aad71104793
src/fragment.glsl
src/fragment.glsl
#version 150 uniform vec2 c; in vec2 fragment_z; out vec4 color; // Complex multiplication. vec2 cmul(vec2 a, vec2 b) { return vec2(a[0] * b[0] - a[1] * b[1], a[0] * b[1] + a[1] * b[0]); } // Complex reciprocal. vec2 cinv(vec2 a) { float norm = dot(a, a); return vec2(a[0] / norm, -a[1] / ...
#version 150 uniform vec2 c; in vec2 fragment_z; out vec4 color; // Complex multiplication. vec2 cmul(vec2 a, vec2 b) { return vec2(a[0] * b[0] - a[1] * b[1], a[0] * b[1] + a[1] * b[0]); } void main() { vec2 z = fragment_z; int it = 0; const int limit = 100; for (it = 0; it < limi...
Revert to a plain Julia set, not reciprocal.
Revert to a plain Julia set, not reciprocal.
GLSL
apache-2.0
jimblandy/julia-glium
174a1a4d98db52ac1472f4268195a538e6626800
src/chunks/applyLight.glsl
src/chunks/applyLight.glsl
/** * Calculates the intensity of light on a surface. * * @method transpose * @private * * */ vec3 applyLight(in vec3 material) { int numLights = int(u_NumLights); float lambertianTerm; vec3 finalColor = vec3(0.0); vec3 normal = normalize(v_Normal); vec3 ambientLight = u_AmbientLight * mate...
/** * Calculates the intensity of light on a surface. * * @method applyLight * @private * */ vec3 applyLight(in vec3 material) { int numLights = int(u_NumLights); vec3 ambientColor = u_AmbientLight * material; vec3 normal = normalize(v_Normal); vec3 center = resolution * 0.5; vec3 eyeVector = ...
Update lighting model to a faster reflection model
Feat: Update lighting model to a faster reflection model
GLSL
mit
yummy222/engine,alexanderGugel/engine,sonwh98/engine,andreaslangsays/engine,steveblue/engine,infamous/engine,prepare/engine,Bizboard/engine,arunabhdas/engine,Wanderfalke/engine,huanghjb/engine,noikiy/engine,codesdk/engine,avikalpa/engine,codesdk/engine,nmai/engine,andreaslangsays/engine,Morgantheplant/engine,trusktr/en...
02d172aae716807969f3f1abc520e35253768839
indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
/** * @file diffuseSkinnedV.glsl * * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. * $License$ */ #version 120 mat4 getObjectSkinnedTransform(); void main() { //transform vertex gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; mat4 mat = getObjectSkinnedTransform(); mat = gl_ModelVie...
/** * @file attachmentShadowV.glsl * * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. * $License$ */ #version 120 mat4 getObjectSkinnedTransform(); void main() { //transform vertex gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; mat4 mat = getObjectSkinnedTransform(); mat = gl_ModelV...
Fix for broken shadows on rigged attachments when attachment penetrates shadow frustum near clip plane.
Fix for broken shadows on rigged attachments when attachment penetrates shadow frustum near clip plane.
GLSL
lgpl-2.1
gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm
88e02abc380edb44b5eb20e88930f287c313d303
ext/gtk+/Makefile.frag
ext/gtk+/Makefile.frag
COMMONDEFS=$(srcdir)/gtk-types.defs $(srcdir)/gdk-types.defs \ $(srcdir)/atk-types.defs $(srcdir)/pango-types.defs GTK_OVERRIDES = \ $(srcdir)/gtk.overrides \ $(srcdir)/gtkcontainer.overrides \ $(srcdir)/gtkstyle.overrides \ $(srcdir)/gtktextview.overrides \ $(srcdir)/gtktreeview.overrides $(builddir)/gen_...
COMMONDEFS=$(srcdir)/gtk-types.defs $(srcdir)/gdk-types.defs \ $(srcdir)/atk-types.defs $(srcdir)/pango-types.defs GTK_OVERRIDES = \ $(srcdir)/gtk.overrides \ $(srcdir)/gtkcontainer.overrides \ $(srcdir)/gtkstyle.overrides \ $(srcdir)/gtktextview.overrides \ $(srcdir)/gtktreeview.overrides $(builddir)/gen_...
Adjust paths to common defs.
Adjust paths to common defs.
GLSL
lgpl-2.1
ewiger/php-gtk,ewiger/php-gtk,ewiger/php-gtk,ewiger/php-gtk,ewiger/php-gtk,ewiger/php-gtk
2cbbe7e1ab20a1f04f902b81dd1a4b3d9d6d2c74
database/square.geo
database/square.geo
a = 50; lt = a; // this needs to be bigger than the stuff below, so let's just use "a" Point(1) = {-a,-a,-a, lt}; Point(2) = {-a,a,-a, lt}; Point(3) = {a, a,-a, lt}; Point(4) = {a,-a,-a, lt}; Line(1) = {1,4}; Line(2) = {4,3}; Line(3) = {3,2}; Line(4) = {2,1}; Line Loop(5) = {2,3,4,1}; Plane Surface(6) = {5}; Physical S...
a = 50; lt = a; // this needs to be bigger than the stuff below, so let's just use "a" Point(1) = {-a,-a,-a, lt}; Point(2) = {-a,a,-a, lt}; Point(3) = {a, a,-a, lt}; Point(4) = {a,-a,-a, lt}; Line(1) = {1,4}; Line(2) = {4,3}; Line(3) = {3,2}; Line(4) = {2,1}; Line Loop(5) = {2,3,4,1}; Plane Surface(6) = {5}; Physical S...
Make the mesh even more dense to be more accurate.
Make the mesh even more dense to be more accurate.
GLSL
bsd-3-clause
BubuLK/sfepy,BubuLK/sfepy,RexFuzzle/sfepy,RexFuzzle/sfepy,rc/sfepy,vlukes/sfepy,olivierverdier/sfepy,RexFuzzle/sfepy,lokik/sfepy,rc/sfepy,sfepy/sfepy,rc/sfepy,lokik/sfepy,olivierverdier/sfepy,vlukes/sfepy,lokik/sfepy,lokik/sfepy,BubuLK/sfepy,vlukes/sfepy,sfepy/sfepy,sfepy/sfepy,olivierverdier/sfepy,RexFuzzle/sfepy
413799500a02379824a37db2eec878617940380e
Shaders/ColorizeShader.glsl
Shaders/ColorizeShader.glsl
uniform vec3 color; uniform sampler2D texture; void main() { vec4 input = texture2D(texture, gl_TexCoord[0].xy); // Add to base color by default. Negative values can be used for subtractive dyeing otherwise. vec4 dye = vec4(1.0 + color[0], 1.0 + color[1], 1.0 + color[2], 1.0); // Apply to a grayscale versi...
uniform vec3 color; uniform sampler2D texture; void main() { vec4 origColor = texture2D(texture, gl_TexCoord[0].xy); // Add to base color by default. Negative values can be used for subtractive dyeing otherwise. vec4 dye = vec4(1.0 + color[0], 1.0 + color[1], 1.0 + color[2], 1.0); // Apply to a grayscale v...
Stop using reserved word in colorize shader
Stop using reserved word in colorize shader Apparently this was not problematic for the dev environment, but a lot like so for whatever part of the VMware or the graphics drivers inside the VMs that was responsible for the shader compilation. Fix #33
GLSL
mit
soulweaver91/project-carrot,soulweaver91/project-carrot
43f6efd46b0dff2715cb223bb102e84bd52b602c
Source/Shaders/PostProcessStages/CompositeTranslucentClassification.glsl
Source/Shaders/PostProcessStages/CompositeTranslucentClassification.glsl
uniform sampler2D colorTexture; #ifdef DEBUG_SHOW_DEPTH uniform sampler2D u_packedTranslucentDepth; #endif varying vec2 v_textureCoordinates; void main() { #ifdef DEBUG_SHOW_DEPTH if (v_textureCoordinates.x < 0.5) { gl_FragColor.rgb = vec3(czm_unpackDepth(texture2D(u_packedTranslucentDepth, v_texture...
uniform sampler2D colorTexture; #ifdef DEBUG_SHOW_DEPTH uniform sampler2D u_packedTranslucentDepth; #endif varying vec2 v_textureCoordinates; void main() { #ifdef DEBUG_SHOW_DEPTH if (v_textureCoordinates.x < 0.5) { gl_FragColor.rgb = vec3(czm_unpackDepth(texture2D(u_packedTranslucentDepth, v_texture...
Fix classification color by doing premultiplied alpha
Fix classification color by doing premultiplied alpha
GLSL
apache-2.0
likangning93/cesium,likangning93/cesium,likangning93/cesium,likangning93/cesium,CesiumGS/cesium,likangning93/cesium,AnalyticalGraphicsInc/cesium,CesiumGS/cesium,AnalyticalGraphicsInc/cesium,CesiumGS/cesium,CesiumGS/cesium,CesiumGS/cesium
54fc98119136c28671b8d4dbcb6463f37c6deb93
Engine/data/Shaders/WaveFragment.glsl
Engine/data/Shaders/WaveFragment.glsl
#version 440 in float amplitude; in float radius; in vec2 centerPosition; in vec2 direction; layout(location = 0) out vec3 heightMap; uniform ivec2 heightMapSize; float BlendFunction(float distanceFromCenter) { float value = distanceFromCenter / (2 * radius); if(value < 0.5) return 1.0; if(value == 0.5) retur...
#version 440 in float amplitude; in float radius; in vec2 centerPosition; in vec2 direction; layout(location = 0) out vec3 heightMap; uniform ivec2 heightMapSize; float BlendFunction(float distanceFromCenter) { float value = distanceFromCenter / (2 * radius); if(value < 0.5) return 1.0; if(value == 0.5) retur...
Fix deplacement horizontal wave particle
Fix deplacement horizontal wave particle
GLSL
bsd-3-clause
GuillaumeArruda/Engine,GuillaumeArruda/Engine
8360b532643264f817e9d648b72e43c20f111ba5
src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl
src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl
PhysicalMaterial material; #ifdef STANDARD_SG material.diffuseColor = diffuseColor.rgb * ( 1.0 - max( max( specular2Factor.r, specular2Factor.g ), specular2Factor.b ) ); material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 ); material.specularColor = specular2Factor.rgb; #else material.diffuseColo...
PhysicalMaterial material; #ifdef STANDARD_SG material.diffuseColor = diffuseColor.rgb; material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 ); material.specularColor = specular2Factor.rgb; #else material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); material.specularRoughness = cl...
Fix diffuse shader code of Specular-Glossiness
Fix diffuse shader code of Specular-Glossiness
GLSL
mit
fraguada/three.js,Ludobaka/three.js,sttz/three.js,googlecreativelab/three.js,amakaroff82/three.js,mese79/three.js,carlosanunes/three.js,ondys/three.js,QingchaoHu/three.js,TristanVALCKE/three.js,satori99/three.js,brianchirls/three.js,daoshengmu/three.js,colombod/three.js,Samsung-Blue/three.js,Amritesh/three.js,fraguada/...
4c8c38edebbe95911916a944f49f462169724f7e
DungeonsOfNoudarX11/res/fragment.glsl
DungeonsOfNoudarX11/res/fragment.glsl
precision mediump float; varying vec2 vTextureCoords; varying vec4 vColour; varying float distance; uniform sampler2D sTexture; uniform vec4 uMod; uniform vec4 uFade; uniform vec4 uFog; void main() { gl_FragColor = texture2D( sTexture, vTextureCoords ); if ( gl_FragColor.a < 0.5 ) { discard; ...
precision mediump float; varying vec2 vTextureCoords; varying vec4 vColour; varying float distance; uniform sampler2D sTexture; uniform vec4 uMod; uniform vec4 uFade; uniform vec4 uFog; void main() { gl_FragColor = texture2D( sTexture, vTextureCoords ); if ( gl_FragColor.a < 0.5 ) { discard; ...
Bring back the lightning modulation
Bring back the lightning modulation
GLSL
bsd-2-clause
TheFakeMontyOnTheRun/dungeons-of-noudar,TheFakeMontyOnTheRun/dungeons-of-noudar
b99469bc99549e355dbf9096c8c3bb41ab332961
shaders/meshface.glsl
shaders/meshface.glsl
#version 130 uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform mat4 modelViewProjectionMatrix; #if defined(VERTEX_SHADER) uniform vec3 color = vec3(1.0); in vec3 position; in vec3 normal; out vec3 position_eye; void main() { gl_Position = modelViewProjectionMatrix * vec4(position,1.0); po...
#version 130 uniform mat4 modelViewMatrix; uniform mat4 projectionMatrix; uniform mat4 modelViewProjectionMatrix; #if defined(VERTEX_SHADER) in vec3 position; in vec3 normal; in vec3 color; out vec3 position_eye; out vec3 fcolor; void main() { gl_Position = modelViewProjectionMatrix * vec4(position,1.0); pos...
Support per-vertex colors in mesh face shader
Bugfix: Support per-vertex colors in mesh face shader The CPU code includes support for this, but somehow it's never been included in the shader.
GLSL
bsd-3-clause
JoshChristie/displaz,JoshChristie/displaz,JoshChristie/displaz,rotorliu/displaz,rotorliu/displaz,rotorliu/displaz,JoshChristie/displaz,JoshChristie/displaz,rotorliu/displaz
1b2051ab03f607d058022f9a60b018b935908a3f
src/engine/shaders/jointedmesh.vert
src/engine/shaders/jointedmesh.vert
#ifdef GL_ES precision highp float; #endif // TODO: This should probably be configurable somewhere #define MAX_JOINT_COUNT 4 attribute vec3 vertexPosition; attribute vec3 vertexNormal; attribute float vertexJointA; attribute float vertexWeightA; attribute float vertexJointB; attribute float vertexWeightB; uniform f...
#ifdef GL_ES precision highp float; #endif // TODO: This should probably be configurable somewhere #define MAX_JOINT_COUNT 4 attribute vec3 vertexPosition; attribute vec3 vertexNormal; attribute float vertexJointA; attribute float vertexWeightA; attribute float vertexJointB; attribute float vertexWeightB; uniform f...
Transform the normals based on joint information
Transform the normals based on joint information
GLSL
mit
bpl/rts37
6ca34760eead7a2037763c76621dae3a92f5c8e6
shaders/EDAF80/celestial_ring.frag
shaders/EDAF80/celestial_ring.frag
#version 410 uniform sampler2D diffuse_texture; uniform sampler2D opacity_texture; uniform int has_diffuse_texture; uniform int has_opacity_texture; in VS_OUT { vec2 texcoord; } fs_in; out vec4 frag_color; void main() { float alpha = 1.0f; if (has_opacity_texture != 0) { alpha = texture(opacity_texture, ...
#version 410 uniform sampler2D diffuse_texture; uniform int has_diffuse_texture; in VS_OUT { vec2 texcoord; } fs_in; out vec4 frag_color; void main() { if (has_diffuse_texture != 0) { frag_color = texture(diffuse_texture, fs_in.texcoord); if (frag_color.a < 0.2f) discard; } else { frag_color = vec4(1.0)...
Remove the opacity texture and use the alpha from the diffuse
Remove the opacity texture and use the alpha from the diffuse The Saturn ring texture from https://www.solarsystemscope.com/textures/ uses the alpha channel.
GLSL
unlicense
LUGGPublic/CG_Labs,LUGGPublic/CG_Labs
58b5f684a6976f9684ed80ce23a799dc88510611
src/embedded_deps/skybox_vert.glsl
src/embedded_deps/skybox_vert.glsl
#version 330 in vec3 position; out vec3 vUV; #pragma include "global_uniforms_incl.glsl" void main(void) { vec4 eyespacePos = (g_view * vec4(position, 0.0)); eyespacePos.w = 1; gl_Position = g_model * eyespacePos; // model matrix here contains the infinite projection vUV = position; }
#version 330 in vec3 position; out vec3 vUV; #pragma include "global_uniforms_incl.glsl" void main(void) { vec4 eyespacePos = (g_view * vec4(position, 0.0)); eyespacePos.w = 1.0; gl_Position = g_model * eyespacePos; // model matrix here contains the infinite projection vUV = position; }
Fix Skybox in WebGL/OpenGL ES 2.x
Fix Skybox in WebGL/OpenGL ES 2.x
GLSL
mit
mortennobel/SimpleRenderEngine,mortennobel/SimpleRenderEngine
3096c037e004f8c8804d9e4a55fa692dd1533bc5
data/shaders/locals.glsl
data/shaders/locals.glsl
layout(std140) uniform b_Locals { mat4 u_World; mat4 u_JointMatrix[4]; vec4 u_Color; vec4 u_MatParams; vec4 u_UvRange; };
layout(std140) uniform b_Locals { vec4 u_Color; vec4 u_MatParams; vec4 u_UvRange; mat4 u_World; mat4 u_JointMatrix[4]; };
Add joint matrices to shaders
Add joint matrices to shaders
GLSL
apache-2.0
kvark/three-rs
5093411947eb8f12879567e1468bffc60016dd91
src/backend/opengl/shaders/histogram_fs.glsl
src/backend/opengl/shaders/histogram_fs.glsl
#version 330 uniform bool isPVCOn; uniform bool isPVAOn; uniform vec4 barColor; in vec4 pervcol; out vec4 outColor; void main(void) { float a = isPVAOn ? pervcol.w : 1.0; outColor = vec4(isPVCOn ? pervcol.xyz : barColor.xyz, isPVAOn ? pervcol.w : 1.0); }
#version 330 uniform bool isPVCOn; uniform bool isPVAOn; uniform vec4 barColor; in vec4 pervcol; out vec4 outColor; void main(void) { outColor = vec4(isPVCOn ? pervcol.xyz : barColor.xyz, isPVAOn ? pervcol.w : 1.0); }
Remove obsolete code from histogram fragment shader
Remove obsolete code from histogram fragment shader
GLSL
bsd-3-clause
arrayfire/forge,arrayfire/forge
3593fc72df23a54262d7acb4873270612812e3f1
demo/textured-blender-fault-cube/shader/vertex.glsl
demo/textured-blender-fault-cube/shader/vertex.glsl
attribute vec3 aVertexPosition; attribute vec3 aVertexNormal; attribute vec2 aWeight; attribute float aJointIndex; attribute float aJointWeight; uniform vec3 uAmbientColor; uniform vec3 uLightingDirection; uniform vec3 uDirectionalColor; uniform mat3 uNMatrix; uniform mat4 uMVMatrix; uniform mat4 uPMatrix; unifor...
attribute vec3 aVertexPosition; attribute vec3 aVertexNormal; attribute vec2 aWeight; attribute float aJointIndex; attribute float aJointWeight; uniform vec3 uAmbientColor; uniform vec3 uLightingDirection; uniform vec3 uDirectionalColor; uniform mat3 uNMatrix; uniform mat4 uMVMatrix; uniform mat4 uPMatrix; unifor...
Use left handed coordinate system
Use left handed coordinate system
GLSL
mit
chinedufn/collada-dae-parser
432fcb5f4f5b88563d61c6dd05a0290a19bab4a3
modflow2netcdf/tests/resources/carolina/carolina.geo
modflow2netcdf/tests/resources/carolina/carolina.geo
[general] precision: single [space] crs: 4326 origin_x: -83.747389 origin_y: 32.917647 rotation: 42.957964853112 units: ft [time] units: days base: 1899-12-31 [output] head: 1-23-07_NOASP.hed cbud: 1-23-07_NOASP.ccf
[general] precision: single [space] crs: 4269 origin_x: -83.747389 origin_y: 32.917647 rotation: -42.957964853112 units: ft [time] units: days base: 1899-12-31 [output] head: 1-23-07_NOASP.hed cbud: 1-23-07_NOASP.ccf
Fix Carolina crs and rotation
Fix Carolina crs and rotation
GLSL
mit
axiom-data-science/modflow2netcdf,spaulins-usgs/modflow2netcdf
5de26c213b815ab27940eb50f36a3e5c0bce577b
Source/Shaders/Builtin/Functions/translucentPhong.glsl
Source/Shaders/Builtin/Functions/translucentPhong.glsl
/** * @private */ vec4 czm_translucentPhong(vec3 toEye, czm_material material) { // Diffuse from directional light sources at eye (for top-down and horizon views) float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal); diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.nor...
/** * @private */ vec4 czm_translucentPhong(vec3 toEye, czm_material material) { // Diffuse from directional light sources at eye (for top-down and horizon views) float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal); if (czm_sceneMode == czm_sceneMode3D) { // (and horiz...
Fix lighting issue for translucent geometry in 2D.
Fix lighting issue for translucent geometry in 2D.
GLSL
apache-2.0
omh1280/cesium,aelatgt/cesium,emackey/cesium,kiselev-dv/cesium,denverpierce/cesium,CesiumGS/cesium,AnimatedRNG/cesium,AnalyticalGraphicsInc/cesium,ggetz/cesium,likangning93/cesium,progsung/cesium,aelatgt/cesium,oterral/cesium,soceur/cesium,esraerik/cesium,ggetz/cesium,omh1280/cesium,CesiumGS/cesium,jason-crow/cesium,ot...
e016de860ac0a7dec14c6ab4caefc405bf791d07
reference/shaders-msl/frag/mix.frag
reference/shaders-msl/frag/mix.frag
#include <metal_stdlib> #include <simd/simd.h> using namespace metal; struct main0_in { float vIn3 [[user(locn3)]]; float vIn2 [[user(locn2)]]; float4 vIn1 [[user(locn1)]]; float4 vIn0 [[user(locn0)]]; }; struct main0_out { float4 FragColor [[color(0)]]; }; fragment main0_out main0(main0_in in [...
#include <metal_stdlib> #include <simd/simd.h> using namespace metal; struct main0_in { float vIn3 [[user(locn3)]]; float vIn2 [[user(locn2)]]; float4 vIn1 [[user(locn1)]]; float4 vIn0 [[user(locn0)]]; }; struct main0_out { float4 FragColor [[color(0)]]; }; fragment main0_out main0(main0_in in [...
Update MSL reference shaders affected by upstream pull.
Update MSL reference shaders affected by upstream pull.
GLSL
apache-2.0
h3xl3r/SPIRV-Cross,h3xl3r/SPIRV-Cross,KhronosGroup/SPIRV-Cross,h3xl3r/SPIRV-Cross,KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross,h3xl3r/SPIRV-Cross,KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross,h3xl3r/SPIRV-Cross
cdb193bdeeccb1fcd5b0a94e25aa29d519b60313
enesim/lib/renderer/enesim_renderer_opengl_common_merge.glsl
enesim/lib/renderer/enesim_renderer_opengl_common_merge.glsl
ENESIM_OPENGL_SHADER( uniform sampler2D merge_texture_0; uniform sampler2D merge_texture_1; void main() { vec4 texel0 = texture2D(merge_texture_0, gl_TexCoord[0]); vec4 texel1 = texture2D(merge_texture_1, gl_TexCoord[0]); gl_FragColor = mix(texel1, texel0, texel0.a); gl_FragColor = texel1.aaaa; //gl_TexCoord[0]; ...
ENESIM_OPENGL_SHADER( uniform sampler2D merge_texture_0; uniform sampler2D merge_texture_1; void main() { vec4 texel0 = texture2D(merge_texture_0, gl_TexCoord[0]); vec4 texel1 = texture2D(merge_texture_1, gl_TexCoord[0]); gl_FragColor = mix(texel1, texel0, texel0.a); //gl_FragColor = texel1.aaaa; //gl_TexCoord[0]...
Make it show the final path
Make it show the final path
GLSL
lgpl-2.1
turran/enesim,turran/enesim,turran/enesim,turran/enesim
33f69d778e5d4d2ac7be4a613a409c0a7ad59b43
src/renderers/shaders/ShaderChunk/fog_fragment.glsl
src/renderers/shaders/ShaderChunk/fog_fragment.glsl
#ifdef USE_FOG float fogDepth = length( vFogPosition ); #ifdef FOG_EXP2 float fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) ); #else float fogFactor = smoothstep( fogNear, fogFar, fogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFact...
#ifdef USE_FOG // divide then multiply by max component to try to avoid saturating mediump precision vec3 fogPositionAbs = abs( vFogPosition ); float fogMaxComponent = max( fogPositionAbs.x, max( fogPositionAbs.y, fogPositionAbs.z ) ); float fogDepth = length( vFogPosition / fogMaxComponent ) * fogMaxComponent; ...
Make distance fog calculation overflow less in mediump
Make distance fog calculation overflow less in mediump
GLSL
mit
Aldrien-/three.js,sttz/three.js,julapy/three.js,greggman/three.js,looeee/three.js,aardgoose/three.js,Liuer/three.js,fernandojsg/three.js,Aldrien-/three.js,jpweeks/three.js,fraguada/three.js,makc/three.js.fork,Samsy/three.js,WestLangley/three.js,Amritesh/three.js,cadenasgmbh/three.js,fernandojsg/three.js,fraguada/three....
2575e8fe6e75aa42e91c98678ee39e7ad5e5088d
XBPageCurl/Resources/FragmentShader.glsl
XBPageCurl/Resources/FragmentShader.glsl
precision mediump float; uniform sampler2D s_tex; varying vec2 v_texCoord; varying vec3 v_normal; void main() { vec3 n = normalize(v_normal); float fFrontFacing = float(gl_FrontFacing); vec4 color = texture2D(s_tex, v_texCoord); gl_FragColor = vec4(color.rgb * (n.z * (fFrontFacing-0.5)*2.0) + vec3(0.1...
precision mediump float; uniform sampler2D s_tex; varying vec2 v_texCoord; varying vec3 v_normal; void main() { vec4 color = texture2D(s_tex, v_texCoord); if (color.a < 0.01) { discard; } vec3 n = normalize(v_normal); float fFrontFacing = float(gl_FrontFacing); gl_FragColor = vec...
Discard fragments with low alpha
Discard fragments with low alpha
GLSL
mit
emodeqidao/XBPageCurl,emodeqidao/XBPageCurl,xissburg/XBPageCurl,xissburg/XBPageCurl
022821fef0b47a146d60dec92a25098d26cc73cb
fxaa.frag
fxaa.frag
#version 330 uniform sampler2D color; uniform vec4 screenSize; in vec2 texcoord; #define FXAA_PC 1 #define FXAA_GLSL_130 1 #define FXAA_QUALITY__PRESET 39 #define FXAA_GREEN_AS_LUMA 1 #include "fxaa3_11.h" void main(void) { vec4 zero = vec4(0.0, 0.0, 0.0, 0.0); gl_FragColor = FxaaPixelShader(texcoord,...
#version 330 #extension GL_ARB_gpu_shader5 : enable uniform sampler2D color; uniform vec4 screenSize; in vec2 texcoord; #define FXAA_PC 1 #define FXAA_GLSL_130 1 #define FXAA_QUALITY__PRESET 39 #define FXAA_GREEN_AS_LUMA 1 #include "fxaa3_11.h" void main(void) { vec4 zero = vec4(0.0, 0.0, 0.0, 0.0); g...
Enable GL_ARB_gpu_shader5 since apparently the shader tries to use it
Enable GL_ARB_gpu_shader5 since apparently the shader tries to use it
GLSL
mit
turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo,turol/smaaDemo
c65c454ae59cf44dbe2e73cb8568969e20685c6d
demo2/res/shaders/simple/vert.glsl
demo2/res/shaders/simple/vert.glsl
#version 400 // the matrices uniform mat4 matProjection; uniform mat4 matView; uniform mat4 matModel; uniform mat3 matNormal; // the vertex attributes in vec3 vertPosition; in vec3 vertNormal; in vec3 vertTangent; in vec3 vertBitangent; in vec2 vertTexCoord; // constants const vec3 lightPos = vec3( 0.0, 20.0, 20.0 )...
#version 400 // the matrices uniform mat4 matProjection; uniform mat4 matView; uniform mat4 matModel; uniform mat3 matNormal; // the vertex attributes in vec3 vertPosition; in vec3 vertNormal; in vec3 vertTangent; in vec3 vertBitangent; in vec2 vertTexCoord; // constants const vec3 lightPos = vec3( 0.0, 20.0, 20.0 )...
Add hack to fix issue with mirrored normal map.
Add hack to fix issue with mirrored normal map.
GLSL
mit
invaderjon/demo,invaderjon/demo
f629abbbb27f1e73e140f6e54397d1e6f17a218c
GridSpace/assets/common.glsl
GridSpace/assets/common.glsl
precision highp float; const vec2 cellDimensions = vec2( 480, 320 ); const vec2 gridSize = vec2( 8, 8 ); // Size of a single texel in an input camera image. const vec2 texelSize = vec2( 1.0 ) / (cellDimensions * vec2(2)); vec2 getTextureOffset( float index ) { float column = mod(index, gridSize.x); float row = flo...
precision highp float; const vec2 cellDimensions = vec2( 480, 320 ); const vec2 gridSize = vec2( 8, 8 ); // Size of a single texel in an input camera image. const vec2 texelSize = vec2( 1.0 ) / (cellDimensions * vec2(4)); vec2 getTextureOffset( float index ) { float column = mod(index, gridSize.x); float row = flo...
Cut blur in half again.
Cut blur in half again.
GLSL
mit
sosolimited/SelfieSelfie,sosolimited/SelfieSelfie,sosolimited/SelfieSelfie
d7177ee733d01a144e619766ca902b9948070aa8
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/assets/shaders/fragment_shader_contrast_es2.glsl
google3/third_party/java_src/android_libs/media/libraries/effect/src/main/assets/shaders/fragment_shader_contrast_es2.glsl
#version 100 // Copyright 2022 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required ...
#version 100 // Copyright 2022 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required ...
Remove clamp function in contrast fragment shader.
Remove clamp function in contrast fragment shader. * OpenGL automatically clamps the output colors to the [0, 1] interval. PiperOrigin-RevId: 465071999 (cherry picked from commit 30fab8c00891b2a5423c169dd75ef0b7d40fe5b7)
GLSL
apache-2.0
google/ExoPlayer,google/ExoPlayer,google/ExoPlayer
6dc381219f1d4dadc946d1d2c7f2a3bdb48e7cca
indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
/** * @file impostorF.glsl * * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. * $License$ */ uniform sampler2D diffuseMap; uniform sampler2D normalMap; uniform sampler2D specularMap; void main() { gl_FragData[0] = texture2D(diffuseMap, gl_TexCoord[0].xy); gl_FragData[1] = texture2D(specularMap, gl_T...
/** * @file impostorF.glsl * * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. * $License$ */ uniform sampler2D diffuseMap; uniform sampler2D normalMap; uniform sampler2D specularMap; void main() { vec4 col = texture2D(diffuseMap, gl_TexCoord[0].xy); gl_FragData[0] = vec4(col.rgb, col.a <= 0.5 ? 0.0 ...
Fix for impostors being fullbright when deferred rendering enabled.
Fix for impostors being fullbright when deferred rendering enabled.
GLSL
lgpl-2.1
gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm
f0e483916fa1c069d3e388ea113af273b476cf57
ext/gtk+/Makefile.frag
ext/gtk+/Makefile.frag
COMMONDEFS=$(srcdir)/gtk-types.defs $(srcdir)/gdk-types.defs \ $(srcdir)/atk-types.defs $(srcdir)/pango-types.defs GTK_OVERRIDES = \ $(srcdir)/gtk.overrides \ $(srcdir)/gtkstyle.overrides $(srcdir)/gen_gtk.c: $(srcdir)/gtk.defs $(COMMONDEFS) $(srcdir)/gtk-extrafuncs.defs $(GTK_OVERRIDES) $(srcdir)/gen_gdk.c: $...
COMMONDEFS=$(srcdir)/gtk-types.defs $(srcdir)/gdk-types.defs \ $(srcdir)/atk-types.defs $(srcdir)/pango-types.defs GTK_OVERRIDES = \ $(srcdir)/gtk.overrides \ $(srcdir)/gtkstyle.overrides $(srcdir)/gen_gtk.c: $(srcdir)/gtk.defs $(COMMONDEFS) $(srcdir)/gtk-extrafuncs.defs $(GTK_OVERRIDES) $(srcdir)/gen_gdk.c: $...
Fix generation error that resulted in a wrong header file being created.
Fix generation error that resulted in a wrong header file being created.
GLSL
lgpl-2.1
marcosptf/php-gtk-src,php/php-gtk-src,marcosptf/php-gtk-src,marcosptf/php-gtk-src,php/php-gtk-src,marcosptf/php-gtk-src,php/php-gtk-src,marcosptf/php-gtk-src,php/php-gtk-src,php/php-gtk-src,php/php-gtk-src,marcosptf/php-gtk-src
3897e90a4fbe99adec6c3e3d40f9e230bbbd9dd7
res/ungrey.fs.glsl
res/ungrey.fs.glsl
#version 140 in vec2 tex_coord; out vec3 color; uniform isampler2D low; uniform isampler2D high; void main() { int s=int(tex_coord.s); int t=int(tex_coord.t); float y; float v; if ((t&0x4)==0) { y=float(texelFetch(low, ivec2(s,t>>3),0)[t&3])+128; } else { y=float(texelFetch(high, ivec2(s,t>>3),0)[...
#version 140 in vec2 tex_coord; out vec3 color; uniform isampler2D low; uniform isampler2D high; void main() { int s=int(tex_coord.s); int t=int(tex_coord.t); float y; if ((t&0x4)==0) { y=float(texelFetch(low, ivec2(s,t>>3),0)[t&3])+128; } else { y=float(texelFetch(high, ivec2(s,t>>3),0)[t&3])+128; ...
Remove unused variable in ungrey fragment shader.
Remove unused variable in ungrey fragment shader.
GLSL
apache-2.0
negge/jpeg_gpu,negge/jpeg_gpu
1d85915f44b1d21ea98aa6f82736efb31380756c
shaders/defaultSkybox.vert
shaders/defaultSkybox.vert
//=========== Copyright © 2018, Planimeter, All rights reserved. =============// // // Purpose: // //============================================================================// #version 330 uniform mat4 view; uniform mat4 projection; in vec3 position; in vec3 texcoord; out vec3 TexCoord; void main() { TexCoord...
//=========== Copyright © 2018, Planimeter, All rights reserved. =============// // // Purpose: // //============================================================================// #version 330 uniform mat4 view; uniform mat4 projection; in vec3 position; in vec3 texcoord; out vec3 TexCoord; void main() { TexCoord...
Fix `TexCoord` variable definition in skybox shader
Fix `TexCoord` variable definition in skybox shader
GLSL
mit
Planimeter/lgameframework,Planimeter/lgameframework,Planimeter/lgameframework
71fcf0d9e6d8ab50a6c66b7a44c0164fc04b3296
reference/shaders-no-opt/frag/image-gather.frag
reference/shaders-no-opt/frag/image-gather.frag
#version 450 layout(binding = 0) uniform sampler2D uSamp; layout(binding = 1) uniform sampler2DShadow uSampShadow; layout(location = 0) out vec4 FragColor; layout(location = 0) in vec3 vUV; void main() { FragColor = textureGather(uSamp, vUV.xy, 0); FragColor += textureGather(uSamp, vUV.xy, 1); FragColor ...
#version 450 layout(binding = 0) uniform sampler2D uSamp; layout(binding = 1) uniform sampler2DShadow uSampShadow; layout(location = 0) out vec4 FragColor; layout(location = 0) in vec3 vUV; void main() { FragColor = textureGather(uSamp, vUV.xy); FragColor += textureGather(uSamp, vUV.xy, 1); FragColor += ...
Update texture gather test result.
Update texture gather test result.
GLSL
apache-2.0
KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross,KhronosGroup/SPIRV-Cross
a321d9359a1fb308930433ceb8e52c82e5d65d80
config/wrap-start.frag
config/wrap-start.frag
(function (root, factory) { if (typeof Livefyre === 'object' && typeof Livefyre.define === 'function' && Livefyre.define.amd) { // Livefyre.define is defined by https://github.com/Livefyre/require // which is packaged into Livefyre.js, // so if define is defined the we don't need to load Liv...
(function (root, factory) { if (typeof Livefyre === 'object' && typeof Livefyre.define === 'function' && Livefyre.define.amd) { // Livefyre.define is defined by https://github.com/Livefyre/require // which is packaged into Livefyre.js, // so if define is defined the we don't need to load Liv...
Configure require to skip data main
Configure require to skip data main
GLSL
mit
Livefyre/Livefyre.js,Livefyre/Livefyre.js
1a1d6abc84de04880bc5737f6af1aee8ef9a63c5
Source/Shaders/CompositeOITFS.glsl
Source/Shaders/CompositeOITFS.glsl
/** * Compositing for Weighted Blended Order-Independent Transparency. See: * http://jcgt.org/published/0002/02/09/ */ uniform sampler2D u_opaque; uniform sampler2D u_accumulation; uniform sampler2D u_revealage; varying vec2 v_textureCoordinates; void main() { vec4 opaque = texture2D(u_opaque, v_textureCoord...
/** * Compositing for Weighted Blended Order-Independent Transparency. See: * http://jcgt.org/published/0002/02/09/ */ uniform sampler2D u_opaque; uniform sampler2D u_accumulation; uniform sampler2D u_revealage; varying vec2 v_textureCoordinates; void main() { vec4 opaque = texture2D(u_opaque, v_textureCoord...
Adjust brightness of translucent geometry proportional to the alpha.
Adjust brightness of translucent geometry proportional to the alpha.
GLSL
apache-2.0
soceur/cesium,ggetz/cesium,denverpierce/cesium,NaderCHASER/cesium,YonatanKra/cesium,hodbauer/cesium,likangning93/cesium,AnimatedRNG/cesium,kaktus40/cesium,josh-bernstein/cesium,likangning93/cesium,denverpierce/cesium,emackey/cesium,AnalyticalGraphicsInc/cesium,CesiumGS/cesium,esraerik/cesium,CesiumGS/cesium,josh-bernst...
1edeec282017918ec46485a78096d21147780c1c
lib/ao.vsh
lib/ao.vsh
attribute vec4 attrib0; attribute vec4 attrib1; uniform mat4 projection; uniform mat4 view; uniform mat4 model; uniform float tileCount; varying vec3 normal; varying vec2 tileCoord; varying vec2 texCoord; varying float ambientOcclusion; void main() { //Compute position vec3 position = attrib0.xyz; //Comp...
attribute vec4 attrib0; attribute vec4 attrib1; uniform mat4 projection; uniform mat4 view; uniform mat4 model; uniform float tileCount; varying vec3 normal; varying vec2 tileCoord; varying vec2 texCoord; varying float ambientOcclusion; void main() { //Compute position vec3 position = attrib0.xyz; //Comp...
Read 16-bit texture IDs from mesher
Read 16-bit texture IDs from mesher Requires deathcap/voxel-mesher@cd154c880a9c8582464864da588da8909d4eccbe Ref https://github.com/mikolalysenko/ao-mesher/issues/4
GLSL
mit
voxel/voxel-shader
859eb20b57601a4ba1fc52350f33eb5ee083c743
ressources/shaders/gbuffer/skybox_gbuffer.frag
ressources/shaders/gbuffer/skybox_gbuffer.frag
#version 330 // Input: position in model space in INTERFACE { vec3 position; } In ; uniform samplerCube textureCubeMap; // Output: the fragment color layout (location = 0) out vec4 fragColor; layout (location = 1) out vec3 fragNormal; layout (location = 2) out vec3 fragEffects; void main(){ fragColor.rgb = tex...
#version 330 // Input: position in model space in INTERFACE { vec3 position; } In ; uniform samplerCube textureCubeMap; // Output: the fragment color layout (location = 0) out vec4 fragColor; layout (location = 1) out vec3 fragNormal; layout (location = 2) out vec3 fragEffects; void main(){ fragColor.rgb = tex...
Set Skybox normal to 0
Set Skybox normal to 0 We have to take into account the [-1,1] → [0,1] scaling/shifting. Former-commit-id: 967041e44c8a8bd9560d4f749a18b0fc97ef4b00
GLSL
mit
kosua20/GL_Template,kosua20/GL_Template
c8867f44735f1c244387517521bf840452fe3d0c
Postprocess.frag
Postprocess.frag
#ifdef GL_ES precision highp float; #define GLSLIFY 1 #endif //Based on Filmic Tonemapping Operators http://filmicgames.com/archives/75 vec3 tonemapFilmic(vec3 color) { vec3 x = max(vec3(0.0), color - 0.004); return (x * (6.2 * x + 0.5)) / (x * (6.2 * x + 1.7) + 0.06); } const float gamma = 2.2; float toGamm...
#ifdef GL_ES precision highp float; #define GLSLIFY 1 #endif //Based on Filmic Tonemapping Operators http://filmicgames.com/archives/75 vec3 tonemapFilmic(vec3 color) { vec3 x = max(vec3(0.0), color - 0.004); return (x * (6.2 * x + 0.5)) / (x * (6.2 * x + 1.7) + 0.06); } const float gamma = 2.2; float toGamm...
Add gamma correction on output
Add gamma correction on output
GLSL
mit
pex-gl/pex-renderer,pex-gl/pex-renderer
499fdcb64001b9ac60683f8c25bcb50bae611219
modflow2netcdf/tests/resources/miami-dade/miami-dade.geo
modflow2netcdf/tests/resources/miami-dade/miami-dade.geo
[general] precision: single [space] crs: 4326 origin_x: -80.6026408 origin_y: 26.04083782 rotation: 0 units: ft [time] units: days base: 1996-01-01 [output] head: Results/UMD.hds cbud: Results/UMD.CBC.bin
[general] precision: single [space] crs: 4326 origin_x: -80.6026408 origin_y: 26.04083782 rotation: 0 units: meters [time] units: days base: 1996-01-01 [output] head: Results/UMD.hds cbud: Results/UMD.CBC.bin
Change Miami-Date test to use meters
Change Miami-Date test to use meters
GLSL
mit
spaulins-usgs/modflow2netcdf,axiom-data-science/modflow2netcdf
ffdc45f4496b50c766cb7e95b649ce17724629f0
Samples/Media/materials/programs/GLSL150/Example_CelShadingFp.glsl
Samples/Media/materials/programs/GLSL150/Example_CelShadingFp.glsl
#version 150 /* Cel shading fragment program for single-pass rendering */ uniform vec4 diffuse; uniform vec4 specular; uniform sampler1D diffuseRamp; uniform sampler1D specularRamp; uniform sampler1D edgeRamp; in float diffuseIn; in float specularIn; in float edge; out vec4 fragColour; uniform lighting { vec4 diff...
#version 150 /* Cel shading fragment program for single-pass rendering */ uniform vec4 diffuse; uniform vec4 specular; uniform sampler1D diffuseRamp; uniform sampler1D specularRamp; uniform sampler1D edgeRamp; in float diffuseIn; in float specularIn; in float edge; out vec4 fragColour; /*uniform lighting { vec4 di...
Fix the Cel shading demo shader
[GL3+] Fix the Cel shading demo shader
GLSL
mit
jakzale/ogre,jakzale/ogre,jakzale/ogre,jakzale/ogre,jakzale/ogre
f5146bc95906b85bf00726d5f6c21939a3a924b5
shaders/video_audio_distortion.frag
shaders/video_audio_distortion.frag
float quadrant(float coord) { coord = sign(coord); return -1.0 * sign(coord * (coord - 1.0)) * 3.1415; } void main(void) { vec2 uv = gl_FragCoord.xy / resolution.xy; vec2 audioUv = abs(2.0*(uv-0.5)); float scaledResolution = 0.33; vec4 t1 = texture2D(audioTexture, vec2(audioUv[0] * scaledResolution, 0.1)); ...
float quadrant(float coord) { coord = sign(coord); return -1.0 * sign(coord * (coord - 1.0)) * 3.1415; } void main(void) { vec2 uv = gl_FragCoord.xy / resolution.xy; vec2 audioUv = abs(2.0*(uv-0.5)); float scaledResolution = 0.33; vec4 t1 = texture2D(audioTexture, vec2(audioUv[0] * scaledResolution, 0.1)); ...
Apply hue shift to video
Apply hue shift to video
GLSL
mit
ulyssesp/webgl-shader-jockey-ts,ulyssesp/webgl-shader-jockey-ts,ulyssesp/webgl-shader-jockey-ts,ulyssesp/webgl-shader-jockey-ts
e6ffbfd741dbc5e04acc643ad19ec5ce3e60cfb6
Samples/Media/materials/programs/GLSL400/TesselationTd.glsl
Samples/Media/materials/programs/GLSL400/TesselationTd.glsl
#version 400 core uniform mat4 g_mWorldViewProjection; // GLSL tessellation evaluation shader (domain shader in HLSL). layout(triangles, equal_spacing, cw) in; void main() { // Baricentric interpolation vec3 finalPos = (gl_TessCoord.x * gl_in[0].gl_Position + gl_TessCoord.y * gl_in[1].gl_Position + gl_TessCoo...
#version 400 core uniform mat4 g_mWorldViewProjection; // GLSL tessellation evaluation shader (domain shader in HLSL). layout(triangles, equal_spacing, cw) in; void main() { // Baricentric interpolation vec3 finalPos = vec3(gl_TessCoord.x * gl_in[0].gl_Position + gl_TessCoord.y * gl_...
Fix implicit vec 3 to vec4 conversion in Tessellation sample GLSL shader
[samples] Fix implicit vec 3 to vec4 conversion in Tessellation sample GLSL shader
GLSL
mit
paroj/ogre,OGRECave/ogre,paroj/ogre,RealityFactory/ogre,paroj/ogre,RealityFactory/ogre,OGRECave/ogre,RealityFactory/ogre,RealityFactory/ogre,RealityFactory/ogre,paroj/ogre,OGRECave/ogre,OGRECave/ogre,paroj/ogre,OGRECave/ogre
f3732da89ae702911129b46b2a3dd01e8512f0af
samples/data/textureshader/frag.glsl
samples/data/textureshader/frag.glsl
#version 330 core in vec2 tex_coords; out vec4 frag_color; uniform sampler2D tex; void main() { frag_color = texture2D(tex, tex_coords); }
#version 330 core in vec2 tex_coords; out vec4 frag_color; uniform sampler2D tex; void main() { frag_color = texture(tex, tex_coords); }
Fix texture call in GLSL
Fix texture call in GLSL
GLSL
mit
gentlemans/gentlemanly_engine,gentlemans/gentlemanly_engine,gentlemans/gentlemanly_engine,gentlemans/gentlemanly_engine
1966b98f72bf477b0e639b1bb3a87e86f080fd05
src/FragmentShader.glsl
src/FragmentShader.glsl
#pragma glslify: applyMaterial = require(./chunks/applyMaterial) #pragma glslify: applyLight = require(./chunks/applyLight) void main() { vec3 material = baseColor.r >= 0.0 ? baseColor : applyMaterial(baseColor); bool lightsEnabled = u_LightColor.r > 0.0 || u_LightColor.g > 0.0 || u_LightColor.b > 0.0; ve...
#pragma glslify: applyMaterial = require(./chunks/applyMaterial) #pragma glslify: applyLight = require(./chunks/applyLight) void main() { vec3 material = baseColor.r >= 0.0 ? baseColor : applyMaterial(baseColor); bool lightsEnabled = u_FlatShading < 1.0 && (u_LightColor.r > 0.0 || u_LightColor.g > 0.0 || u_Li...
Add flat shading to unique meshes
Feat: Add flat shading to unique meshes
GLSL
mit
Bizboard/engine,mcanthony/engine,yummy222/engine,CedarLogic/engine,woltemade/engine,noikiy/engine,CedarLogic/engine,TheAlphaNerd/engine,aug2uag/engine,sonwh98/engine,andreaslangsays/engine,aug2uag/engine,Morgantheplant/engine,nmai/engine,trusktr/engine,huanghjb/engine,arunabhdas/engine,Famous/engine,infamous/engine,art...
3a3f3db45106ba8dabc2735d7b02d39142fad054
src/quick/scenegraph/shaders/distancefieldshiftedtext.frag
src/quick/scenegraph/shaders/distancefieldshiftedtext.frag
varying highp vec2 sampleCoord; varying highp vec2 shiftedSampleCoord; uniform sampler2D _qt_texture; uniform lowp vec4 color; uniform lowp vec4 styleColor; uniform mediump float alphaMin; uniform mediump float alphaMax; void main() { highp float a = smoothstep(alphaMin, alphaMax, texture2D(_qt_texture, sampleCoo...
varying highp vec2 sampleCoord; varying highp vec2 shiftedSampleCoord; uniform mediump sampler2D _qt_texture; uniform lowp vec4 color; uniform lowp vec4 styleColor; uniform mediump float alphaMin; uniform mediump float alphaMax; void main() { highp float a = smoothstep(alphaMin, alphaMax, texture2D(_qt_texture, s...
Set sampler precision in shifted distance field text shader
Set sampler precision in shifted distance field text shader The precision would default to lowp and we would attempt to call smoothstep(mediump, mediump, lowp) which was a non-existent overload on some drivers, thus causing a compiler failure. We can use mediump for the sampler, like in the regular distance field shad...
GLSL
lgpl-2.1
mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,qmlc/qtdeclarative,qmlc/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,qmlc/qtdeclarative,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,mgrunditz/qtdeclarative-2d,matth...
9920daed5009bb461c3f742cc12ff313e84b101c
src/shaders/gl/gui.glsl
src/shaders/gl/gui.glsl
#if VX_SHADER == VX_VERTEX_SHADER layout(location = 0) in vec2 a_position; layout(location = 1) in vec2 a_uv; layout(location = 2) in vec4 a_color; layout(binding = 1, column_major) uniform global_constants { mat4 u_projection; }; out vec2 v_frag_uv; out vec4 v_frag_color; void main() { v_frag_uv = a_uv; ...
#if VX_SHADER == VX_VERTEX_SHADER layout(location = 0) in vec2 a_position; layout(location = 1) in vec2 a_uv; layout(location = 2) in vec4 a_color; layout(binding = 1, column_major) buffer global_constants { mat4 u_projection; }; out vec2 v_frag_uv; out vec4 v_frag_color; void main() { v_frag_uv = a_uv; ...
Fix ImGui regression in OpenGL backend
Fix ImGui regression in OpenGL backend
GLSL
mit
phoekz/voxed,phoekz/voxed,phoekz/voxed,phoekz/voxed,phoekz/voxed,phoekz/voxed
656d736252f114a31ac8217202ba157cbd545136
Engine/Assets/Shaders/Additive.shader
Engine/Assets/Shaders/Additive.shader
--- base: RenderStages/PostPhysicalGeometry.shader modules: - type: Vertex path: Additive.Vertex.glsl - type: Fragment path: Additive.Fragment.glsl uniforms: - name: modelViewProjection binding: ModelViewProjectionMatrix - name: additiveTexture type: Texture2 - name: intensity type: Float ...
--- base: RenderStages/PostPhysicalGeometry.shader modules: - type: Vertex path: Additive.Vertex.glsl - type: Fragment path: Additive.Fragment.glsl uniforms: - name: modelViewProjection binding: ModelViewProjectionMatrix - name: additiveTexture type: Texture2 - name: intensity type: Float ...
Revert "Seeing if recent Valgrind failure is false"
Revert "Seeing if recent Valgrind failure is false" This reverts commit d7ba66fb9f9fc2555d2ab0c84644b8230d09c43b.
GLSL
mit
colinhect/hect,colinhect/hect,colinhect/hect,colinhect/hect
68ddaa770cadc1c37d0b0a3be66dae60e65f296f
lib/ao.fsh
lib/ao.fsh
precision highp float; uniform float tileSize; uniform sampler2D tileMap; varying vec3 normal; varying vec2 tileCoord; varying vec2 texCoord; varying float ambientOcclusion; void main() { vec2 uv = texCoord; vec4 color = vec4(0,0,0,0); float weight = 0.0; vec2 tileOffset = 2.0 * tileSize * tileCo...
precision highp float; uniform float tileSize; uniform sampler2D tileMap; uniform float tileCount; varying vec3 normal; varying vec2 tileCoord; varying vec2 texCoord; varying float ambientOcclusion; void main() { vec2 uv = texCoord; vec4 color = vec4(0,0,0,0); float weight = 0.0; vec2 tileOffset ...
Add tileCount uniform to fragment shader
Add tileCount uniform to fragment shader
GLSL
mit
mikolalysenko/ao-shader,voxel/voxel-shader
564ee270109d528a01c689fc9296a54776f14ce4
riritools/material/high_performance_simple_font.fp
riritools/material/high_performance_simple_font.fp
varying lowp vec2 var_texcoord0; varying lowp vec4 var_face_color; uniform lowp vec4 texture_size_recip; uniform lowp sampler2D texture; void main() { lowp vec2 t = texture2D(texture, var_texcoord0.xy).xy; gl_FragColor = vec4(var_face_color.xyz, 1.0); }
varying lowp vec2 var_texcoord0; varying lowp vec4 var_face_color; uniform lowp vec4 texture_size_recip; uniform lowp sampler2D texture; void main() { gl_FragColor = vec4(var_face_color.xyz, 1.0) * texture2D(texture, var_texcoord0.xy).x * var_face_color.w; }
Fix High Performance Simple Font Material Shader
Fix High Performance Simple Font Material Shader Fix High Performance Simple Font Material Shader
GLSL
mit
CodingKitsune/Riritools
2c43f9f1a6057f25440dcbcd2fedede89a5052e5
indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
/** * @file impostorF.glsl * * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. * $License$ */ uniform sampler2D diffuseMap; uniform sampler2D normalMap; uniform sampler2D specularMap; void main() { gl_FragData[0] = texture2D(diffuseMap, gl_TexCoord[0].xy); gl_FragData[1] = texture2D(specularMap, gl_T...
/** * @file impostorF.glsl * * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. * $License$ */ uniform sampler2D diffuseMap; uniform sampler2D normalMap; uniform sampler2D specularMap; void main() { vec4 col = texture2D(diffuseMap, gl_TexCoord[0].xy); gl_FragData[0] = vec4(col.rgb, col.a <= 0.5 ? 0.0 ...
Fix for impostors being fullbright when deferred rendering enabled.
Fix for impostors being fullbright when deferred rendering enabled.
GLSL
lgpl-2.1
gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm
2185699b345fc88522d61544502def6f4a17dedd
src/shaders/blinn_fs.glsl
src/shaders/blinn_fs.glsl
varying vec3 N; varying vec3 p; uniform vec3 light_pos; /* Injected by Three.js uniform mat4 viewMatrix; uniform vec3 cameraPosition; */ void main() { vec3 V = normalize(viewMatrix * vec4(cameraPosition, 1.0)).xyz; vec3 Lp = (viewMatrix * vec4(light_pos, 1.0)).xyz; vec3 L = normalize(p - Lp); vec3 H = normal...
varying vec3 N; varying vec3 p; uniform vec3 light_pos; /* Injected by Three.js uniform mat4 viewMatrix; uniform vec3 cameraPosition; */ void main() { vec3 V = normalize(viewMatrix * vec4(cameraPosition, 1.0)).xyz; vec3 Lp = (viewMatrix * vec4(light_pos, 1.0)).xyz; vec3 L = normalize(p - Lp); vec3 H = normal...
Comment on var Nn in Fragment Shader.
Comment on var Nn in Fragment Shader.
GLSL
mit
skurmedel/webglmat,skurmedel/webglmat
e72ca980810aaa067cd3c473e3d0f58d49a80e9e
src/shader/drawobj_fs.glsl
src/shader/drawobj_fs.glsl
#version 450 precision highp float; precision highp int; layout(location = 0) in vec3 normal; layout(location = 1) in vec2 uv; uniform sampler2D s0; // albedo. uniform bool hasAlbedo; layout(location = 0) out vec4 outColor; void main() { if (hasAlbedo) { outColor = texture2D(s0, uv); } else { // TODO outC...
#version 450 precision highp float; precision highp int; layout(location = 0) in vec3 normal; layout(location = 1) in vec2 uv; uniform sampler2D s0; // albedo. uniform bool hasAlbedo; layout(location = 0) out vec4 outColor; void main() { if (hasAlbedo) { outColor = texture2D(s0, uv); } else { // TODO outC...
Modify to draw constant color if there is no albedo texture.
Modify to draw constant color if there is no albedo texture.
GLSL
mit
nakdai/aten,nakdai/aten
7b7d668f584499ca86f2cbcde2033675055e4fe9
share/shaders/orderIndependentTransparency/composition.frag
share/shaders/orderIndependentTransparency/composition.frag
#version 120 uniform sampler2DRect AccumulationSampler; uniform sampler2DRect RevealageSampler; void main() { vec4 Accumulation = texture2DRect(AccumulationSampler, gl_FragCoord.xy); float Revealage = Accumulation.a; Accumulation.a = texture2DRect(RevealageSampler, gl_FragCoord.xy).r; vec3 Color ...
#version 120 #extension GL_ARB_texture_rectangle : enable uniform sampler2DRect AccumulationSampler; uniform sampler2DRect RevealageSampler; void main() { vec4 Accumulation = texture2DRect(AccumulationSampler, gl_FragCoord.xy); float Revealage = Accumulation.a; Accumulation.a = texture2DRect(RevealageSamp...
Order Independent Transparency for old graphics card
FIX: Order Independent Transparency for old graphics card Former-commit-id: 9b25d8754990fa425409dfc486a180317df5ba4d
GLSL
lgpl-2.1
Anatoscope/sofa,FabienPean/sofa,hdeling/sofa,Anatoscope/sofa,hdeling/sofa,hdeling/sofa,Anatoscope/sofa,Anatoscope/sofa,FabienPean/sofa,FabienPean/sofa,Anatoscope/sofa,Anatoscope/sofa,hdeling/sofa,hdeling/sofa,Anatoscope/sofa,hdeling/sofa,FabienPean/sofa,FabienPean/sofa,FabienPean/sofa,FabienPean/sofa,hdeling/sofa,hdeli...
40cd5713616b46ccbc7d7793e6081c5c4ba15902
app/src/main/res/raw/default_shader.glsl
app/src/main/res/raw/default_shader.glsl
#ifdef GL_FRAGMENT_PRECISION_HIGH precision highp float; #else precision mediump float; #endif uniform float time; uniform int pointerCount; uniform vec3 pointers[10]; uniform vec2 resolution; void main(void) { float mx = max(resolution.x, resolution.y); vec2 uv = gl_FragCoord.xy / mx; vec3 color = vec3( uv, 0...
#ifdef GL_FRAGMENT_PRECISION_HIGH precision highp float; #else precision mediump float; #endif uniform float time; uniform int pointerCount; uniform vec3 pointers[10]; uniform vec2 resolution; void main(void) { float mx = max(resolution.x, resolution.y); vec2 uv = gl_FragCoord.xy / mx; vec3 color = vec3( uv, 0...
Remove excess space character from default sample
Remove excess space character from default sample Leftover from conversion.
GLSL
mit
markusfisch/ShaderEditor,markusfisch/ShaderEditor
9287e80d5ac513a872d9e765a9ff01f96d02800b
Sharp2D/Sharp2D/Resources/sprite_light_alpha.frag
Sharp2D/Sharp2D/Resources/sprite_light_alpha.frag
#version 150 uniform vec3 lightdata; //for now rg is pos, b is radius, a is intensity uniform vec3 lightcolor; uniform vec3 ambient; uniform float ambientmult; in vec2 fragtexcoord; in vec2 pixpos; uniform sampler2D texture0; //only one texture for now, we can get creative later out vec4 fragColor; void main(){ ...
#version 150 uniform vec3 lightdata; //for now rg is pos, b is radius, a is intensity uniform vec3 lightcolor; uniform vec3 ambient; uniform float ambientmult; in vec2 fragtexcoord; in vec2 pixpos; uniform sampler2D texture0; //only one texture for now, we can get creative later out vec4 fragColor; void main(){ ...
Fix provided by roboman for sprites with alpha
Fix provided by roboman for sprites with alpha
GLSL
apache-2.0
CatinaCupGames/Sharp2D
ca7a08242c3152ea87f840e8f10966d64e2ff7be
src/shader/clearHABuffer.frag
src/shader/clearHABuffer.frag
#version 440 #extension GL_NV_gpu_shader5 : enable coherent uniform uint64_t *u_Records; // all fragment records (<depth|pointer> pairs) coherent uniform uint32_t *u_Counts; // auxiliary counters uniform uint u_NumRecords; uniform uint u_ScreenSz; in vec4 u_Pos; out vec4 o_PixColor; void main() ...
#version 440 #extension GL_NV_gpu_shader5 : enable coherent uniform uint64_t *u_Records; // all fragment records (<depth|pointer> pairs) coherent uniform uint32_t *u_Counts; // auxiliary counters uniform uint u_NumRecords; uniform uint u_ScreenSz; in vec4 u_Pos; void main() { // Ignore helper ...
Remove output variable from clear shader, because all pixels are discarded.
Remove output variable from clear shader, because all pixels are discarded.
GLSL
mit
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
1603d2a49f28a17c815ddc5bc480e2fc48273682
assets/shaders/simple.frag
assets/shaders/simple.frag
#version 410 uniform sampler2D tex; in vec2 fragTexCoord; out vec4 outputColor; in vec4 position; void main() { outputColor = texture(tex, fragTexCoord); //outputColor = vec4(position.x*0.25, position.y*0.75, position.z, 0); }
#version 410 uniform sampler2D tex; in vec2 fragTexCoord; out vec4 outputColor; in vec4 position; void main() { if(gl_FrontFacing) outputColor = texture(tex, fragTexCoord); else outputColor = vec4(1.0, 0.5,0.0,0.0); //outputColor = vec4(position.x*0.25, position.y*0.75, position.z, 0); }
Set back face of triangles to render as orange
Set back face of triangles to render as orange
GLSL
mit
Ariemeth/quantum-pulse
c9d8c2c202bd9e6706cb094cd49f3c26e2232341
Assets/Shaders/MW_Standard_Blended.shader
Assets/Shaders/MW_Standard_Blended.shader
Shader "TES Unity/Standard Blended" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1)) = 0.0 [HideInInspector] _SrcBlend("__src", Float) = 1.0 [HideInInspector] _DstBlend("__dst", F...
Shader "TES Unity/Standard Blended" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1)) = 0.0 [HideInInspector] _SrcBlend("__src", Float) = 1.0 [HideInInspector] _DstBlend("__dst", F...
Fix for transparent material shadows. Alpha blended material + alpha tested shadows
Fix for transparent material shadows. Alpha blended material + alpha tested shadows
GLSL
mit
demonixis/TESUnity,ColeDeanShepherd/TESUnity
c53ab13691fb5cff6d06bf0649afa80a4f584bd5
Assets/Shaders/Temporal.shader
Assets/Shaders/Temporal.shader
Shader "Hidden/Temporal" { Properties { _MainTex ("Texture", 2D) = "white" {} } CGINCLUDE #include "UnityCG.cginc" struct Input { float4 position : POSITION; float2 uv : TEXCOORD0; }; struct Varyings { float4 position : SV_POSITION; float2 uv : TEXCOORD0; }; Varyings vertex(Input ...
Shader "Hidden/Temporal" { Properties { _MainTex ("Texture", 2D) = "white" {} } CGINCLUDE #include "UnityCG.cginc" struct Input { float4 position : POSITION; float2 uv : TEXCOORD0; }; struct Varyings { float4 position : SV_POSITION; float2 uv : TEXCOORD0; }; Varyings vertex(Input ...
Fix the direction of the motion vector offset
Fix the direction of the motion vector offset
GLSL
mit
gokselgoktas/temporal-sandbox
f753ed0f3929fb4f724bc8cb1ec1b7298253272a
ressources/shaders/gbuffer/ssao.frag
ressources/shaders/gbuffer/ssao.frag
#version 330 // Input: UV coordinates in INTERFACE { vec2 uv; } In ; // Uniforms. uniform sampler2D depthTexture; uniform sampler2D normalTexture; uniform vec2 inverseScreenSize; uniform mat4 projectionMatrix; uniform sampler2D noiseTexture; // 5x5 3-components texture with float precision. uniform vec3 samples[16...
#version 330 // Input: UV coordinates in INTERFACE { vec2 uv; } In ; // Uniforms. uniform sampler2D depthTexture; uniform sampler2D normalTexture; uniform vec2 inverseScreenSize; uniform mat4 projectionMatrix; uniform sampler2D noiseTexture; // 5x5 3-components texture with float precision. uniform vec3 samples[16...
Add function to linearize depth and compute view-space position
Add function to linearize depth and compute view-space position Linearize depth using parameters extracted from the projection matrix. Combiningwith linear depth and NDC coordinates, we can recompute view-space position. Former-commit-id: c2858605618586f746951639513dccc709cbce1a
GLSL
mit
kosua20/GL_Template,kosua20/GL_Template