-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/DarkPacks/SkyFactory-5 i…
…nto develop
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/minecraft/thingpacks/sf5_things/assets/colorblindness/shaders/program/color_shift.fsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#version 150 | ||
|
||
uniform sampler2D DiffuseSampler; | ||
|
||
in vec2 texCoord; | ||
in vec2 oneTexel; | ||
|
||
out vec4 fragColor; | ||
|
||
uniform vec3 RedMatrix; | ||
uniform vec3 GreenMatrix; | ||
uniform vec3 BlueMatrix; | ||
|
||
void main() { | ||
vec4 InTexel = texture(DiffuseSampler, texCoord); | ||
|
||
// Color Matrix | ||
float RedValue = dot(InTexel.rgb, RedMatrix); | ||
float GreenValue = dot(InTexel.rgb, GreenMatrix); | ||
float BlueValue = dot(InTexel.rgb, BlueMatrix); | ||
vec3 OutColor = vec3(RedValue, GreenValue, BlueValue); | ||
|
||
fragColor = vec4(OutColor, 1.0); | ||
} |
20 changes: 20 additions & 0 deletions
20
src/minecraft/thingpacks/sf5_things/assets/colorblindness/shaders/program/color_shift.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"blend": { | ||
"func": "add", | ||
"srcrgb": "one", | ||
"dstrgb": "zero" | ||
}, | ||
"vertex": "sobel", | ||
"fragment": "colorblindness:color_shift", | ||
"attributes": [ "Position" ], | ||
"samplers": [ | ||
{ "name": "DiffuseSampler" } | ||
], | ||
"uniforms": [ | ||
{ "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, | ||
{ "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, | ||
{ "name": "RedMatrix", "type": "float", "count": 3, "values": [ 1.0, 0.0, 0.0 ] }, | ||
{ "name": "GreenMatrix", "type": "float", "count": 3, "values": [ 0.0, 1.0, 0.0 ] }, | ||
{ "name": "BlueMatrix", "type": "float", "count": 3, "values": [ 0.0, 0.0, 1.0 ] } | ||
] | ||
} |