conversations
listlengths
3
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Simplify compositing shader now that sun/sky/stars are drawn to opaque framebuffer.\n" }, { "from": "human", "value": "uniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()...
glsl
chosen
[ { "from": "system", "value": "Add gamma to filmic tonemapping \n\nSo it has the same api as reinhard and uncharted2" }, { "from": "human", "value": "//Based on Filmic Tonemapping Operators http://filmicgames.com/archives/75\nvec3 tonemapFilmic(vec3 color) {\n vec3 x = max(vec3(0.0), color - 0...
glsl
chosen
[ { "from": "system", "value": "Add missing divide to the alchemy AO\n" }, { "from": "human", "value": "\n/*\n\nALCHEMY AO\n\nProjects random points to screen space, and uses the average unoccluded vector\nto approximate AO.\n\n*/\n\n\nconst int num_samples = GET_SETTING(AO, alchemy_num_samples);\...
glsl
chosen
[ { "from": "system", "value": "Fix normal transformation by calculating the normal matrix.\n\nThis is quite an expensive operation, but passing the normal matrix\nto every object is probably worse considering that only the phong shader\nneeds it.\n" }, { "from": "human", "value": "#version 440\n\...
glsl
chosen
[ { "from": "system", "value": "Add tonemapping and encoding support\n" }, { "from": "human", "value": "uniform vec3 diffuse;\nuniform float opacity;\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdept...
glsl
chosen
[ { "from": "system", "value": "Include z coordinate in manifold texture coordinates.\n" }, { "from": "human", "value": "/* #include \"perspective.glsl\" */\n\nuniform float noise_amplitude;\nuniform vec2 noise_freq;\n\nvarying float scaled_noise_amplitude;\n\nvoid main() {\n vec4 proj;\n vec2 t...
glsl
chosen
[ { "from": "system", "value": "Feat: Add ability to change the strength and color of glossiness\n" }, { "from": "human", "value": "/**\n * Calculates the intensity of light on a surface.\n *\n * @method applyLight\n * @private\n *\n */\nvec3 applyLight(in vec3 material) {\n int numLights = int...
glsl
chosen
[ { "from": "system", "value": "shaders: Use correct presence flag for diffuse_texture\n" }, { "from": "human", "value": "#version 410\n\nuniform sampler2D diffuse_texture;\nuniform int has_textures;\n\nin VS_OUT {\n\tvec2 texcoord;\n} fs_in;\n\nout vec4 frag_color;\n\nvoid main()\n{\n\tif (has_te...
glsl
chosen
[ { "from": "system", "value": "[GL3+] Fix the Cel shading demo shader\n" }, { "from": "human", "value": "#version 150\n\n/* Cel shading fragment program for single-pass rendering */\nuniform vec4 diffuse;\nuniform vec4 specular;\nuniform sampler1D diffuseRamp;\nuniform sampler1D specularRamp;\nun...
glsl
chosen
[ { "from": "system", "value": "Create a nice 2D mesh with coarsening.\n" }, { "from": "human", "value": "a = 50;\nlt = 2;\nPoint(1) = {-a,-a,-a, lt};\nPoint(2) = {-a,a,-a, lt};\nPoint(3) = {a, a,-a, lt};\nPoint(4) = {a,-a,-a, lt};\nLine(1) = {1,4};\nLine(2) = {4,3};\nLine(3) = {3,2};\nLine(4) = {...
glsl
chosen
[ { "from": "system", "value": "Set static object lightmap multiplication to 2.4.\n\nBecause iROSE shader source says so.\n" }, { "from": "human", "value": "uniform sampler2D texture1;\nuniform sampler2D texture2;\nvarying vec2 vUv1;\nvarying vec2 vUv2;\n\nvoid main() {\n vec4 baseColor = texture...
glsl
chosen
[ { "from": "system", "value": "Include vertex alpha for glyph shader - fixes a few reftests\n" }, { "from": "human", "value": "#ifdef GL_ES\n precision mediump float;\n#endif\n\nuniform sampler2D sDiffuse;\n\nvarying vec2 vTexCoord;\nvarying vec4 vColor;\n\nvoid main(void)\n{\n\t#ifdef PLATFOR...
glsl
chosen
[ { "from": "system", "value": "Fix wrong keyword; Must be 'varying' in ES 2.0.\n" }, { "from": "human", "value": "precision highp float;\r\nin vec2 vfPosition;\r\nin vec2 vfCoord;\r\nuniform sampler2D s0;\r\n\r\nvoid main()\r\n{\r\n\tvec4 src = texture2D(s0, vfCoord);\r\n\tfloat result = src.w;\r...
glsl
chosen
[ { "from": "system", "value": "Use ints in for loop\n" }, { "from": "human", "value": "precision highp float;\n\n// a.xy = resolution\n// a.z = time\n// a.w = fade\nuniform vec4 a;\n\n// b.x = 1\n// b.y = kick drum volume\n// b.z = t>>18\nuniform vec4 b;\n\nvoid main() {\n // ray marcher temp re...
glsl
chosen
[ { "from": "system", "value": "Change shader lights to be fixed in world space\n" }, { "from": "human", "value": "#version 330 core\n\nin vec3 fs_w_norm;\n\nout vec3 color;\n\nuniform vec3 base_color;\n\nvoid main()\n{\n\tvec3 light_0_dir = vec3(0.577, 0.577, 0.577);\n\tvec3 light_0_col = vec3(1....
glsl
chosen
[ { "from": "system", "value": "Fix: Update ambient to account for flat shading\n" }, { "from": "human", "value": "#pragma glslify: applyMaterial = require(./chunks/applyMaterial)\n#pragma glslify: applyLight = require(./chunks/applyLight)\n\nvoid main() {\n vec3 material = baseColor.r >= 0.0 ?...
glsl
chosen
[ { "from": "system", "value": "Adjust paths to common defs.\n\n" }, { "from": "human", "value": "\nCOMMONDEFS=$(srcdir)/gtk-types.defs $(srcdir)/gdk-types.defs \\\n\t\t $(srcdir)/atk-types.defs $(srcdir)/pango-types.defs\n\nGTK_OVERRIDES = \\\n\t$(srcdir)/gtk.overrides \\\n\t$(srcdir)/gtkcontai...
glsl
chosen
[ { "from": "system", "value": "[GL3+] Fix the Cel shading demo shader\n\n--HG--\nbranch : v1-9\n" }, { "from": "human", "value": "#version 150\n\n/* Cel shading fragment program for single-pass rendering */\nuniform vec4 diffuse;\nuniform vec4 specular;\nuniform sampler1D diffuseRamp;\nuniform sa...
glsl
chosen
[ { "from": "system", "value": "Remove extraneous input parameter from lesson 3 if GLSL is 1.4 or higher\n" }, { "from": "human", "value": "#ifdef GL_ES\nprecision highp float;\n#endif\n\n#if __VERSION__ >= 140\nin vec4 aPosition;\n int vec4 vColour;\n#else\n varying vec4 vColour;\n#endif\n...
glsl
chosen
[ { "from": "system", "value": "Fix the white texture issue.\n" }, { "from": "human", "value": "#version 330\n\nuniform sampler2D textureSampler;\n\nin vec3 normalColour;\nin vec2 texturePoint;\n\nout vec4 fragmentColour;\n\nvec3 getPrimitiveColour();\n\n\nvoid main()\n{\n //fragmentColour = ve...
glsl
chosen
[ { "from": "system", "value": "Use the correct precision specifier in visualizer GLSL.\n\nTask-number: QTBUG-39119\nChange-Id: I0ec4909167f5694ce4229df8202c89742be21d0a\nReviewed-by: Laszlo Agocs <00c05606d635b5d8e1450a8536e4e2809abe4e80@digia.com>\nReviewed-by: Andrew Knight <ccebd4d9fbda4a2105d17b207d80666...
glsl
chosen
[ { "from": "system", "value": "Support decoding, tonemapping, and output encoding\n" }, { "from": "human", "value": "uniform sampler2D t2D;\n\nvarying vec2 vUv;\n\nvoid main() {\n\n\tgl_FragColor = texture2D( t2D, vUv );\n\n}\n" }, { "from": "gpt", "value": "uniform sampler2D t2D;\n\n...
glsl
chosen
[ { "from": "system", "value": "Adjust character & zombie sprite shadings" }, { "from": "human", "value": "#version 150 core\n\nin vec2 v_BufPos;\nout vec4 Target0;\n\nuniform sampler2D t_CharacterSheet;\n\nconst float SHADING_MULTIPLIER = 0.5;\n\nvoid main() {\n vec4 tex = texture(t_CharacterShe...
glsl
chosen
[ { "from": "system", "value": "Add anti-aliasing to polyline outline material.\n" }, { "from": "human", "value": "uniform float outlineWidth;\n\nvarying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm...
glsl
chosen
[ { "from": "system", "value": "[samples] Fix implicit vec 3 to vec4 conversion in Tessellation sample GLSL shader\n\n--HG--\nbranch : v1-10\n" }, { "from": "human", "value": "#version 400 core\n\nuniform mat4 g_mWorldViewProjection;\n\n// GLSL tessellation evaluation shader (domain shader in HLSL...
glsl
chosen
[ { "from": "system", "value": "Reorder order of extrusions to ensure periodic sides match up.\n\nThis will have worked before depending on gmsh version.\n" }, { "from": "human", "value": "// Gmsh project created on Thu Mar 6 16:27:33 2008\nPoint(1) = {0,0,0};\nExtrude {1.7,0,0} {\n Point{1}; La...
glsl
chosen
[ { "from": "system", "value": "Optimize the dimension of vector.\n\nUse more lower dimensional vector if possible.\n" }, { "from": "human", "value": "uniform sampler2D texDiffuse;\n\nvarying mediump vec4 texCoord[2];\n\n#define invLDRRange 1.0//(255.0/240.0)\n#if 1\n// HDTV with BT.709\n#define l...
glsl
chosen
[ { "from": "system", "value": "Fix shader compile error for inside volume raycasting\n" }, { "from": "human", "value": "/*****************************************************************************************\n * ...
glsl
chosen
[ { "from": "system", "value": "Fix rendering artifact for partially-clipped spheres.\n\nIf a sphere was clipped by the near-plane, the unclipped back of\nthe sphere would be rendered using the lighting equations for the\nfront of the sphere.\n\nThis patch ensures that spheres that would be clipped by the nea...
glsl
chosen
[ { "from": "system", "value": "Fix GLSL forward compatibility issues\n" }, { "from": "human", "value": "#version 330\n\nin vec4 io_color;\nin vec2 io_texcoord;\n\nuniform sampler2D surface_texture;\n\nvoid main()\n{\n\tgl_FragColor = io_color * texture2D(surface_texture, io_texcoord);\n}\n" }, ...
glsl
chosen
[ { "from": "system", "value": "Read packed normal for mesher voxel format change\n\nRequires deathcap/voxel-mesher@56ab4142c5068abdf14aa6596eb620f7267db511\n\nRef https://github.com/mikolalysenko/ao-mesher/issues/4\n" }, { "from": "human", "value": "attribute vec4 attrib0;\nattribute vec4 attrib1...
glsl
chosen
[ { "from": "system", "value": "Use ints in the GoL shader.\n" }, { "from": "human", "value": "#ifdef GL_ES\nprecision mediump float;\n#endif\n\nuniform sampler2D state;\nuniform vec2 scale;\n\nfloat get(vec2 offset) {\n return texture2D(state, (gl_FragCoord.xy + offset) / scale).r;\n}\n\nvoid ...
glsl
chosen
[ { "from": "system", "value": "tools: Set alpha to 100 % opaque in KTX viewer to avoid glitches\n\nSigned-off-by: onox <34c1d3d2d1347bea60a26f46574de21a7a79b6d5@gmail.com>\n" }, { "from": "human", "value": "#version 420 core\n\n#extension GL_ARB_shading_language_420pack : require\n\nin VS_OUT {\n...
glsl
chosen
[ { "from": "system", "value": "Improve shader for UI and alpha handling\n" }, { "from": "human", "value": "#version 330 core\n\nin vec2 TexCoords;\nin vec4 Color;\n\nout vec4 color;\n\nuniform sampler2D text;\n\nvoid main()\n{\n vec4 t = texture(text, TexCoords);\n if (t.r < 0.1)\n d...
glsl
chosen
[ { "from": "system", "value": "Add clean-gen and clean-caches targets.\n\n" }, { "from": "human", "value": "\n$(srcdir)/php_gtk_ext.c: $(srcdir)/php_gtk_ext.c.in $(builddir)/config.status\n\t@echo \"creating main/php_gtk_ext.c\"\n\tsh $(top_srcdir)/build2/genext.sh $(srcdir)/php_gtk_ext.c.in $(to...
glsl
chosen
[ { "from": "system", "value": "Fix uninitialized variable in shader causing glitches from time to time (and code style)\n" }, { "from": "human", "value": "#version 330 core\n\n#define NB_DIRECTIONAL_LIGHTS 1\n#define NB_POINT_LIGHTS 1\n\nin vec3 FragPos;\nin vec3 Normal;\nin vec2 TexCoords;\n\nou...
glsl
chosen
[ { "from": "system", "value": "Fix MSL shader_draw_parameters reference output.\n" }, { "from": "human", "value": "#include <metal_stdlib>\n#include <simd/simd.h>\n\nusing namespace metal;\n\nstruct main0_out\n{\n float4 gl_Position [[position]];\n};\n\nstruct main0_in\n{\n uint gl_BaseVert...
glsl
chosen
[ { "from": "system", "value": "Update weight function and fix 2D.\n" }, { "from": "human", "value": "/**\n * @private\n */\nfloat czm_alphaWeight(float a)\n{\n // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:\n // http://jcgt.org/publishe...
glsl
chosen
[ { "from": "system", "value": "Stop film in direction of travel\n" }, { "from": "human", "value": "#property description De-sync the shutter and the film feed\n\nvoid main(void) {\n\n // Lookup what offset to display the picture at\n float offset = texture(iChannel[1], vec2(0.5, 0.5)).r;\n\...
glsl
chosen
[ { "from": "system", "value": "Use the right joints in the shader\n\nANIMATION !!!\n" }, { "from": "human", "value": "attribute vec3 aVertexPosition;\nattribute vec2 aWeight;\n\nattribute float aJointIndex;\nattribute float aJointWeight;\n\nuniform mat4 uMVMatrix;\nuniform mat4 uPMatrix;\n\nunifo...
glsl
chosen
[ { "from": "system", "value": "Add missing copyright statement in shader\n" }, { "from": "human", "value": "#include \"glsl_globals.h\"\n\nIO_LOCATION(0) out vec4 color_out;\n\nvoid main(void)\n{\n color_out = intBitsToFloat(gl_PrimitiveID).xxxx;\n}\n" }, { "from": "gpt", "value": "/...
glsl
chosen
[ { "from": "system", "value": "Refactor of matcap fragment shader.\n" }, { "from": "human", "value": "#version 150\n\nuniform sampler2D image;\n\nin vec3 cI; // incident ray, camera space\nin vec3 cN; // normal, camera space\n\nout vec4 fragColor;\n\nvoid main()\n{\n vec3 r = reflect( cI, cN ...
glsl
chosen
[ { "from": "system", "value": "Add pixel sampler/raster size shader accesors\n" }, { "from": "human", "value": "#ifdef TANGRAM_FRAGMENT_SHADER\n\nuniform sampler2D u_rasters[TANGRAM_NUM_RASTER_SOURCES];\nuniform vec2 u_raster_sizes[TANGRAM_NUM_RASTER_SOURCES];\nuniform vec3 u_raster_offsets[TANGR...
glsl
chosen
[ { "from": "system", "value": "Fix generation error that resulted in a wrong header file being created.\n\n" }, { "from": "human", "value": "COMMONDEFS=$(srcdir)/gtk-types.defs $(srcdir)/gdk-types.defs \\\n\t\t $(srcdir)/atk-types.defs $(srcdir)/pango-types.defs\n\nGTK_OVERRIDES = \\\n\t$(srcdi...
glsl
chosen
[ { "from": "system", "value": "Clean up w/Marc & Jeremy\n" }, { "from": "human", "value": "\nuniform mat4 transform;\nuniform mat4 texMatrix;\nuniform mat3 normalMatrix;\n\nuniform sampler2D displacementMap;\nuniform float displaceStrength;\n\nattribute vec4 vertex;\nattribute vec4 color;\nattrib...
glsl
chosen
[ { "from": "system", "value": "Fix manifold noise amplitude calculation.\n" }, { "from": "human", "value": "/* #include \"perspective.glsl\" */\n\nuniform float noise_amplitude;\nuniform vec2 noise_freq;\n\nvarying float scaled_noise_amplitude;\n\nvoid main() {\n vec4 proj;\n vec2 texc;\n\n pr...
glsl
chosen
[ { "from": "system", "value": "Fix point size on web." }, { "from": "human", "value": "\n// @program p_simple, vertex, fragment\n\nuniform mat4 u_mvp;\n\n-- vertex\n\nattribute vec4 a_position;\n\nvoid main()\n{\n vec4 p = a_position;\n p.xy -= 0.5;\n p.y *= -1.0;\n gl_Position = u_mv...
glsl
chosen
[ { "from": "system", "value": "Add phong shading example to main shader\n" }, { "from": "human", "value": "#version 140\n#extension GL_ARB_shading_language_include : enable\n#extension GL_ARB_explicit_attrib_location : enable\n\nlayout(location = 0) out vec4 color;\nin vec2 position;\n\nuniform i...
glsl
chosen
[ { "from": "system", "value": "Remove erroneous squaring of fragment color in texture shader\n" }, { "from": "human", "value": "#ifdef GL_ES\nprecision highp float;\n#endif\n\nvarying vec2 v_texcoord0;\nvarying vec4 v_color;\n\nuniform sampler2D u_texture0;\n\nvoid main() {\n gl_FragColor = v_...
glsl
chosen
[ { "from": "system", "value": "Fix to get the BlinkGap helper library working with PollUntil\n" }, { "from": "human", "value": "// Begin!\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define('bic', [\n 'feature!promises',\n 'jqu...
glsl
chosen
[ { "from": "system", "value": "Fix visual defect during text scroll\n\nChange-Id: Idf9d2f3bbf08dcb0832b1493ce9c3526f12440ae\nSigned-off-by: Eunki, Hong <301831f1139537c1cbbc3eb529a9eda692d8c1bb@samsung.com>\n" }, { "from": "human", "value": "attribute mediump vec2 aPosition;\nvarying highp vec2 v...
glsl
chosen
[ { "from": "system", "value": "Fix shader compiler error \"offset needs to be a constant\"\n" }, { "from": "human", "value": "///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Copyright (c) 2016, Intel Corporation\n// Permi...
glsl
chosen
[ { "from": "system", "value": "Use white background also in single layer renderings.\n\nSo that the debug views can be compared to the overall result.\n" }, { "from": "human", "value": "#version 440\n\nin vec2 vertexTexCoord;\n\nuniform sampler2D textureSampler;\nuniform vec4 backgroundColor = ve...
glsl
chosen
[ { "from": "system", "value": "Set normal alpha color to 1.f\n" }, { "from": "human", "value": "#version 330\n\nin vec3 f_color;\nin vec4 f_normal;\nin vec2 f_uv;\n\nlayout(location = 0) out vec4 diffuse;\nlayout(location = 1) out vec4 normal;\n\nvoid main(){\n\tdiffuse = vec4(f_color, 1.f);\n\t/...
glsl
chosen
[ { "from": "system", "value": "Change weight function yet again. This looks better with outlined geometry.\n" }, { "from": "human", "value": "/**\n * @private\n */\nfloat czm_alphaWeight(float z, float a)\n{\n // See Weighted Blended Order-Independent Transparency for examples of different wei...
glsl
chosen
[ { "from": "system", "value": "Remove clamp function in contrast fragment shader.\n\n* OpenGL automatically clamps the output colors to the [0, 1] interval.\n\nPiperOrigin-RevId: 465071999\n(cherry picked from commit 2347db5d7484b161f6389846e6cde5b0ac1ed7a6)\n" }, { "from": "human", "value": "#ve...
glsl
chosen
[ { "from": "system", "value": "Use no albedo for water plane.\n" }, { "from": "human", "value": "#version 310 es\nprecision mediump float;\n\nlayout(location = 0) in highp vec2 vUV;\n\nlayout(location = 0) out vec3 Emissive;\nlayout(location = 1) out vec4 BaseColor;\nlayout(location = 2) out vec3...
glsl
chosen
[ { "from": "system", "value": "Fix hole in terrabuff when looking directly down.\n" }, { "from": "human", "value": "varying float rel;\nvarying vec2 screen_coords;\nuniform sampler2D hmap, tex;\nuniform float ty_below;\nuniform float line_thickness;\nuniform vec2 screen_size;\n\nvoid main() {\n ...
glsl
chosen
[ { "from": "system", "value": "Normalize the light direction to reduce issues with the light being overly intense.\n" }, { "from": "human", "value": "// Copyright 2014 Joshua R. Rodgers\n// \n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file excep...
glsl
chosen
[ { "from": "system", "value": "Add PCONN objects to build instruction\n" }, { "from": "human", "value": "$(SAPI_PCONN_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)\n\t$(BUILD_PCONN)\n\n" }, { "from": "gpt", "value": "$(SAPI_PCONN_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(PHP_PCONN_OBJ...
glsl
chosen
[ { "from": "system", "value": "Fix typo in the fragment shader\n" }, { "from": "human", "value": "precision mediump float;\n\nuniform sampler2D textures[5];\n\nvarying vec4 vColour;\nvarying vec2 vTexturePos;\nvarying vec2 vTextureOffset;\nvarying float vLighting;\nvarying float vTextureSize;\nva...
glsl
chosen
[ { "from": "system", "value": "Build frag end exports all keys from LivefyreJS/main onto window.Livefyre\n" }, { "from": "human", "value": " // The return value from here will be assigned to window.Livefyre\n\n var Livefyre = window.Livefyre || {};\n\n // We only have an async reference ...
glsl
chosen
[ { "from": "system", "value": "Fix shader file in 00-intro-0\n\nFixes #45. Thanks @justinabrahms!\n" }, { "from": "human", "value": "float brightness() {\n return 0.0;\n}\n\n//Do not change this line\n#pragma glslify: export(brightness)\n" }, { "from": "gpt", "value": "float brightne...
glsl
chosen
[ { "from": "system", "value": "Add a function to compute perceptual luma.\n\nThe luma can be seen as a perceived intensity. This is the reason why\nthe coefficients in its computations give more importance to the green\nchannel, as our eye is most sensitive to the green wavelengths.\n\n\nFormer-commit-id: 68...
glsl
chosen
[ { "from": "system", "value": "Fix font rendering winding order.\n" }, { "from": "human", "value": "/*\nText rendering - Vertex Shader\n*/\n#version 400\nlayout(location = 0) in vec2 vertexPosition;\nlayout(location = 1) in vec2 vertexTexture;\n\nuniform vec2 position;\nuniform vec2 size;\n\nunif...
glsl
chosen
[ { "from": "system", "value": "Fix: Update ambient to account for flat shading\n" }, { "from": "human", "value": "#pragma glslify: applyMaterial = require(./chunks/applyMaterial)\n#pragma glslify: applyLight = require(./chunks/applyLight)\n\nvoid main() {\n vec3 material = baseColor.r >= 0.0 ?...
glsl
chosen
[ { "from": "system", "value": "vcl: Remove the extra colon at the end of shader\n\nChange-Id: I0a1a2346176a9f2f4d62ca80a9485d720b522cef\n" }, { "from": "human", "value": "/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */\n/*\n * This file is part of the LibreOffice p...
glsl
chosen
[ { "from": "system", "value": "[SofaOpenGLVisual] Fix compilation (in generateDepth shader)\n" }, { "from": "human", "value": "#version 120\n\nuniform vec4 u_lightType;\n\nvarying vec4 lightVec;\n\n\nvoid main()\n{\t\n\tvec4 lp;\n\t//lp = lightPosition; \n\t//lp = vec4(0.0,0.0,0.0,1.0);\n\n\tvec4...
glsl
chosen
[ { "from": "system", "value": "Fix for impostors being fullbright when deferred rendering enabled.\n" }, { "from": "human", "value": "/** \n * @file impostorF.glsl\n *\n * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.\n * $License$\n */\n\nuniform sampler2D diffuseMap;\nuniform sampler2...
glsl
chosen
[ { "from": "system", "value": "Revert to a plain Julia set, not reciprocal.\n" }, { "from": "human", "value": "#version 150\n\nuniform vec2 c;\nin vec2 fragment_z;\nout vec4 color;\n\n// Complex multiplication.\nvec2 cmul(vec2 a, vec2 b) {\n return vec2(a[0] * b[0] - a[1] * b[1],\n ...
glsl
chosen
[ { "from": "system", "value": "Feat: Update lighting model to a faster reflection model\n" }, { "from": "human", "value": "/**\n * Calculates the intensity of light on a surface.\n * \n * @method transpose\n * @private\n *\n *\n */\n\nvec3 applyLight(in vec3 material) {\n int numLights = int(u...
glsl
chosen
[ { "from": "system", "value": "Fix for broken shadows on rigged attachments when attachment penetrates shadow frustum near clip plane.\n" }, { "from": "human", "value": "/** \n * @file diffuseSkinnedV.glsl\n *\n * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.\n * $License$\n */\n\n#vers...
glsl
chosen
[ { "from": "system", "value": "Make the mesh even more dense to be more accurate.\n" }, { "from": "human", "value": "a = 50;\nlt = a; // this needs to be bigger than the stuff below, so let's just use \"a\"\nPoint(1) = {-a,-a,-a, lt};\nPoint(2) = {-a,a,-a, lt};\nPoint(3) = {a, a,-a, lt};\nPoint(4...
glsl
chosen
[ { "from": "system", "value": "Stop using reserved word in colorize shader\n\nApparently this was not problematic for the dev environment, but\na lot like so for whatever part of the VMware or the graphics\ndrivers inside the VMs that was responsible for the shader\ncompilation.\n\nFix #33\n" }, { "f...
glsl
chosen
[ { "from": "system", "value": "Fix classification color by doing premultiplied alpha\n" }, { "from": "human", "value": "uniform sampler2D colorTexture;\n\n#ifdef DEBUG_SHOW_DEPTH\nuniform sampler2D u_packedTranslucentDepth;\n#endif\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n#ifdef D...
glsl
chosen
[ { "from": "system", "value": "Fix deplacement horizontal wave particle\n" }, { "from": "human", "value": "#version 440\n\nin float amplitude;\nin float radius;\nin vec2 centerPosition;\nin vec2 direction;\nlayout(location = 0) out vec3 heightMap;\n\nuniform ivec2 heightMapSize;\n\nfloat BlendFun...
glsl
chosen
[ { "from": "system", "value": "Fix diffuse shader code of Specular-Glossiness\n" }, { "from": "human", "value": "PhysicalMaterial material;\n\n#ifdef STANDARD_SG\n\tmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - max( max( specular2Factor.r, specular2Factor.g ), specular2Factor.b ) );\n\tmater...
glsl
chosen
[ { "from": "system", "value": "Bring back the lightning modulation\n" }, { "from": "human", "value": "precision mediump float;\nvarying vec2 vTextureCoords;\nvarying vec4 vColour;\nvarying float distance;\nuniform sampler2D sTexture;\nuniform vec4 uMod;\nuniform vec4 uFade;\nuniform vec4 uFog;\n\...
glsl
chosen
[ { "from": "system", "value": "Bugfix: Support per-vertex colors in mesh face shader\n\nThe CPU code includes support for this, but somehow it's never been\nincluded in the shader.\n" }, { "from": "human", "value": "#version 130\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nun...
glsl
chosen
[ { "from": "system", "value": "Transform the normals based on joint information\n" }, { "from": "human", "value": "#ifdef GL_ES\nprecision highp float;\n#endif\n\n// TODO: This should probably be configurable somewhere\n#define MAX_JOINT_COUNT 4\n\nattribute vec3 vertexPosition;\nattribute vec3 v...
glsl
chosen
[ { "from": "system", "value": "Remove the opacity texture and use the alpha from the diffuse\n\nThe Saturn ring texture from https://www.solarsystemscope.com/textures/\nuses the alpha channel.\n" }, { "from": "human", "value": "#version 410\n\nuniform sampler2D diffuse_texture;\nuniform sampler2D...
glsl
chosen
[ { "from": "system", "value": "Fix Skybox in WebGL/OpenGL ES 2.x\n" }, { "from": "human", "value": "#version 330\nin vec3 position;\nout vec3 vUV;\n\n#pragma include \"global_uniforms_incl.glsl\"\n\nvoid main(void) {\n vec4 eyespacePos = (g_view * vec4(position, 0.0));\n eyespacePos.w = 1;\...
glsl
chosen
[ { "from": "system", "value": "Add joint matrices to shaders\n" }, { "from": "human", "value": "layout(std140) uniform b_Locals {\n mat4 u_World;\n mat4 u_JointMatrix[4];\n vec4 u_Color;\n vec4 u_MatParams;\n vec4 u_UvRange;\n};\n" }, { "from": "gpt", "value": "layout(s...
glsl
chosen
[ { "from": "system", "value": "Remove obsolete code from histogram fragment shader\n" }, { "from": "human", "value": "#version 330\n\nuniform bool isPVCOn;\nuniform bool isPVAOn;\nuniform vec4 barColor;\n\nin vec4 pervcol;\nout vec4 outColor;\n\nvoid main(void)\n{\n float a = isPVAOn ? pervcol...
glsl
chosen
[ { "from": "system", "value": "Use left handed coordinate system\n" }, { "from": "human", "value": "attribute vec3 aVertexPosition;\nattribute vec3 aVertexNormal;\nattribute vec2 aWeight;\n\nattribute float aJointIndex;\nattribute float aJointWeight;\n\nuniform vec3 uAmbientColor;\n\nuniform vec3...
glsl
chosen
[ { "from": "system", "value": "Fix Carolina crs and rotation\n" }, { "from": "human", "value": "[general]\nprecision: single\n\n[space]\ncrs: 4326\norigin_x: -83.747389\norigin_y: 32.917647\nrotation: 42.957964853112\nunits: ft\n\n[time]\nunits: days\nbase: 1899-12-31\n\n[output]\n...
glsl
chosen
[ { "from": "system", "value": "Fix lighting issue for translucent geometry in 2D.\n" }, { "from": "human", "value": "/**\n * @private\n */\nvec4 czm_translucentPhong(vec3 toEye, czm_material material)\n{\n // Diffuse from directional light sources at eye (for top-down and horizon views)\n f...
glsl
chosen
[ { "from": "system", "value": "Update MSL reference shaders affected by upstream pull.\n" }, { "from": "human", "value": "#include <metal_stdlib>\n#include <simd/simd.h>\n\nusing namespace metal;\n\nstruct main0_in\n{\n float vIn3 [[user(locn3)]];\n float vIn2 [[user(locn2)]];\n float4 v...
glsl
chosen
[ { "from": "system", "value": "Make it show the final path\n\n" }, { "from": "human", "value": "ENESIM_OPENGL_SHADER(\nuniform sampler2D merge_texture_0;\nuniform sampler2D merge_texture_1;\n\nvoid main()\n{\n\tvec4 texel0 = texture2D(merge_texture_0, gl_TexCoord[0]);\n\tvec4 texel1 = texture2D(m...
glsl
chosen
[ { "from": "system", "value": "Make distance fog calculation overflow less in mediump\n" }, { "from": "human", "value": "#ifdef USE_FOG\n\n\tfloat fogDepth = length( vFogPosition );\n\n\t#ifdef FOG_EXP2\n\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDept...
glsl
chosen
[ { "from": "system", "value": "Discard fragments with low alpha\n" }, { "from": "human", "value": "precision mediump float;\n\nuniform sampler2D s_tex;\nvarying vec2 v_texCoord;\nvarying vec3 v_normal;\n\nvoid main()\n{\n vec3 n = normalize(v_normal);\n float fFrontFacing = float(gl_FrontFa...
glsl
chosen
[ { "from": "system", "value": "Enable GL_ARB_gpu_shader5 since apparently the shader tries to use it\n" }, { "from": "human", "value": "#version 330\n\n\nuniform sampler2D color;\nuniform vec4 screenSize;\n\n\nin vec2 texcoord;\n\n\n#define FXAA_PC 1\n#define FXAA_GLSL_130 1\n#define FXAA_QUALITY...
glsl
chosen
[ { "from": "system", "value": "Add hack to fix issue with mirrored normal map.\n" }, { "from": "human", "value": "#version 400\n\n// the matrices\nuniform mat4 matProjection;\nuniform mat4 matView;\nuniform mat4 matModel;\nuniform mat3 matNormal;\n\n// the vertex attributes\nin vec3 vertPosition;...
glsl
chosen
[ { "from": "system", "value": "Cut blur in half again.\n" }, { "from": "human", "value": "\nprecision highp float;\n\nconst vec2 cellDimensions = vec2( 480, 320 );\nconst vec2 gridSize = vec2( 8, 8 );\n// Size of a single texel in an input camera image.\nconst vec2 texelSize = vec2( 1.0 ) / (cell...
glsl
chosen
[ { "from": "system", "value": "Remove clamp function in contrast fragment shader.\n\n* OpenGL automatically clamps the output colors to the [0, 1] interval.\n\nPiperOrigin-RevId: 465071999\n(cherry picked from commit 30fab8c00891b2a5423c169dd75ef0b7d40fe5b7)\n" }, { "from": "human", "value": "#ve...
glsl
chosen
[ { "from": "system", "value": "Remove unused variable in ungrey fragment shader.\n" }, { "from": "human", "value": "#version 140\nin vec2 tex_coord;\nout vec3 color;\nuniform isampler2D low;\nuniform isampler2D high;\nvoid main() {\n int s=int(tex_coord.s);\n int t=int(tex_coord.t);\n float y;...
glsl
chosen
[ { "from": "system", "value": "Fix `TexCoord` variable definition in skybox shader\n" }, { "from": "human", "value": "//=========== Copyright © 2018, Planimeter, All rights reserved. =============//\n//\n// Purpose:\n//\n//==========================================================================...
glsl
chosen
[ { "from": "system", "value": "Update texture gather test result.\n" }, { "from": "human", "value": "#version 450\n\nlayout(binding = 0) uniform sampler2D uSamp;\nlayout(binding = 1) uniform sampler2DShadow uSampShadow;\n\nlayout(location = 0) out vec4 FragColor;\nlayout(location = 0) in vec3 vUV...
glsl
chosen
[ { "from": "system", "value": "Configure require to skip data main\n" }, { "from": "human", "value": "(function (root, factory) {\n if (typeof Livefyre === 'object' && typeof Livefyre.define === 'function' && Livefyre.define.amd) {\n // Livefyre.define is defined by https://github.com/L...
glsl
chosen
[ { "from": "system", "value": "Adjust brightness of translucent geometry proportional to the alpha.\n" }, { "from": "human", "value": "/**\n * Compositing for Weighted Blended Order-Independent Transparency. See:\n * http://jcgt.org/published/0002/02/09/\n */\n \nuniform sampler2D u_opaque;\nunif...
glsl
chosen