-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a64681
commit 8fb0a35
Showing
119 changed files
with
1,610 additions
and
336 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
from https://stephaneginier.com/archive/testperf/resources/matcaps/ |
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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,16 @@ | ||
with regards to mc01.jpg...mc24.jpg | ||
https://github.com/martijnberger/blender/tree/master/release/datafiles/matcaps | ||
These matcap images are licensed as GNU GPL 2 or later, like the rest of Blender's code. | ||
Thanks to Kent Trammell, Aidy Burrows, John Herreno , Terry Wallwork and David Silverman for making the pictures. | ||
|
||
carpaint from | ||
https://blog.mikepan.com/post/137759885931/realistic-car-paint-brdf-material | ||
|
||
with regards to fubax.jpg | ||
https://github.com/Fubaxiusz/fubax-shaders/blob/master/Textures/matcap.png | ||
|
||
cortex and red plastic matcaps from | ||
http://www.alecjacobson.com/weblog/?p=4827 | ||
|
||
remaining matcaps from | ||
https://devtalk.blender.org/t/call-for-content-matcaps/737/203 |
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 @@ | ||
https://polycount.com/discussion/64453/tf2-and-toon-realtime-viewport-shader-3ds-max |
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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,57 @@ | ||
//pref | ||
Brighten|float|0.5|1.5|2.5 | ||
SurfaceColor|float|0.0|1.0|1.0 | ||
Edge|float|0|0.2|1.0 | ||
PenWidth|float|0.01|1|1 | ||
MatCap|set|1|1|1 | ||
Material Capture Shader http://www.alecjacobson.com/weblog/?p=4827l|note | ||
//vert | ||
#version 330 | ||
layout(location = 0) in vec3 Vert; | ||
layout(location = 3) in vec3 Norm; | ||
layout(location = 6) in vec4 Clr; | ||
out vec3 vN, vV; | ||
out vec4 vClr, vP; | ||
uniform mat4 ModelViewProjectionMatrix; | ||
uniform mat4 ModelViewMatrix; | ||
uniform mat3 NormalMatrix; | ||
void main() { | ||
vN = normalize((NormalMatrix * Norm)); | ||
vP = vec4(Vert, 1.0); | ||
gl_Position = ModelViewProjectionMatrix * vec4(Vert, 1.0); | ||
vV = -vec3(ModelViewMatrix*vec4(Vert,1.0)); | ||
vClr = Clr; | ||
} | ||
//frag | ||
#version 330 | ||
in vec4 vClr, vP; | ||
in vec3 vN, vV; | ||
out vec4 color; | ||
uniform float Brighten = 0.2; | ||
uniform float SurfaceColor = 0.5; | ||
uniform float Edge = 0.1; | ||
uniform float PenWidth = 0.75; | ||
uniform vec4 ClipPlane = vec4(2.0, 0.0, 0.0, 0.0); | ||
uniform sampler2D MatCap; | ||
|
||
vec3 desaturate(vec3 color, float amount) { | ||
vec3 gray = vec3(dot(vec3(0.2126,0.7152,0.0722), color)); | ||
return vec3(mix(color, gray, amount)); | ||
} | ||
|
||
void main() { | ||
if ((ClipPlane[0] < 1.5) && (dot( ClipPlane, vP) > 0.0)) discard; | ||
vec3 n = normalize(vN); | ||
vec3 v = normalize(vV); | ||
float lightNormDot = abs(dot(n,v)); //with respect to viewer | ||
if (PenWidth < lightNormDot) discard; | ||
vec2 uv = n.xy * 0.5 + 0.5; | ||
vec3 clr = texture(MatCap,uv.xy).rgb; | ||
vec3 surf = mix(vec3(0.67, 0.67, 0.67), vClr.rgb, SurfaceColor); //0.67 as default Brighten is 1.5 | ||
clr = clr * surf * Brighten; | ||
vec3 backclr = desaturate(clr, 0.75); | ||
clr *= min((lightNormDot - 0.5) * Edge, 0.0) + 1.0; | ||
//clr *= min((max(dot(n,normalize(v)), 0.0) - 0.5) * Edge, 0.0) + 1.0; | ||
float backface = step(0.0, n.z); | ||
color = vec4(mix(backclr, clr, backface), 1.0); | ||
} |
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,49 @@ | ||
//pref | ||
Brighten|float|0.5|1.5|2.5 | ||
SurfaceColor|float|0.0|1.0|1.0 | ||
Edge|float|0|0.2|1.0 | ||
PenWidth|float|0.01|1|1 | ||
MatCap|set|1|1|1 | ||
Material Capture Shader http://www.alecjacobson.com/weblog/?p=4827l|note | ||
//vert | ||
#version 330 | ||
layout(location = 0) in vec3 Vert; | ||
layout(location = 3) in vec3 Norm; | ||
layout(location = 6) in vec4 Clr; | ||
out vec3 vN, vV; | ||
out vec4 vClr, vP; | ||
uniform mat4 ModelViewProjectionMatrix; | ||
uniform mat4 ModelViewMatrix; | ||
uniform mat3 NormalMatrix; | ||
void main() { | ||
vN = normalize((NormalMatrix * Norm)); | ||
vP = vec4(Vert, 1.0); | ||
gl_Position = ModelViewProjectionMatrix * vec4(Vert, 1.0); | ||
vV = -vec3(ModelViewMatrix*vec4(Vert,1.0)); | ||
vClr = Clr; | ||
} | ||
//frag | ||
#version 330 | ||
in vec4 vClr, vP; | ||
in vec3 vN, vV; | ||
out vec4 color; | ||
uniform float Brighten = 0.2; | ||
uniform float SurfaceColor = 0.5; | ||
uniform float Edge = 0.1; | ||
uniform float PenWidth = 0.75; | ||
uniform vec4 ClipPlane = vec4(2.0, 0.0, 0.0, 0.0); | ||
uniform sampler2D MatCap; | ||
|
||
void main() { | ||
if ((ClipPlane[0] < 1.5) && (dot( ClipPlane, vP) > 0.0)) discard; | ||
vec3 n = normalize(vN); | ||
vec3 v = normalize(vV); | ||
float lightNormDot = abs(dot(n,v)); //with respect to viewer | ||
if (PenWidth < lightNormDot) discard; | ||
vec2 uv = n.xy * 0.5 + 0.5; | ||
vec3 clr = texture(MatCap,uv.xy).rgb; | ||
vec3 surf = mix(vec3(0.67, 0.67, 0.67), vClr.rgb, SurfaceColor); //0.67 as default Brighten is 1.5 | ||
clr = clr * surf * Brighten; | ||
clr *= min((lightNormDot - 0.5) * Edge, 0.0) + 1.0; | ||
color = vec4(clr, 1.0); | ||
} |
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,47 @@ | ||
//pref | ||
Brighten|float|0.5|1.5|2.5 | ||
SurfaceColor|float|0.0|1.0|1.0 | ||
Edge|float|0|0.2|1.0 | ||
PenWidth|float|0.01|1|1 | ||
MatCap|set|1|1|1 | ||
Material Capture Shader http://www.alecjacobson.com/weblog/?p=4827l|note | ||
//vert | ||
varying vec3 vN, vV; | ||
varying vec4 vP, vClr; | ||
|
||
void main() { | ||
vN = normalize(gl_NormalMatrix * gl_Normal); | ||
vV = -vec3(gl_ModelViewMatrix*gl_Vertex); | ||
vP = gl_Vertex; | ||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; | ||
vClr = gl_Color; | ||
} | ||
//frag | ||
uniform vec4 ClipPlane; | ||
uniform sampler2D MatCap; | ||
uniform float Brighten, SurfaceColor, Edge, PenWidth; | ||
varying vec3 vN, vV; | ||
varying vec4 vP, vClr; | ||
|
||
vec3 desaturate(vec3 color, float amount) { | ||
vec3 gray = vec3(dot(vec3(0.2126,0.7152,0.0722), color)); | ||
return vec3(mix(color, gray, amount)); | ||
} | ||
|
||
void main() { | ||
if ((ClipPlane[0] < 1.5) && (dot( ClipPlane, vP) > 0.0)) discard; | ||
vec3 n = normalize(vN); | ||
vec3 v = normalize(vV); | ||
float lightNormDot = abs(dot(n,v)); //with respect to viewer | ||
if (PenWidth < lightNormDot) discard; | ||
vec2 uv = n.xy * 0.5 + 0.5; | ||
vec3 clr = texture2D(MatCap,uv.xy).rgb; | ||
vec3 surf = mix(gl_FrontMaterial.ambient.rgb, vClr.rgb, vClr.a); | ||
surf = mix(vec3(0.67, 0.67, 0.67), surf, SurfaceColor); //0.67 as default Brighten is 1.5 | ||
clr = clr * surf * Brighten; | ||
vec3 backclr = desaturate(clr, 0.75); | ||
//clr *= min((max(dot(n,normalize(v)), 0.0) - 0.5) * Edge, 0.0) + 1.0; | ||
clr *= min((lightNormDot - 0.5) * Edge, 0.0) + 1.0; | ||
float backface = step(0.0, n.z); | ||
gl_FragColor = vec4(mix(backclr.rgb, clr.rgb, backface), 1.0); | ||
} |
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,39 @@ | ||
//pref | ||
Brighten|float|0.5|1.5|2.5 | ||
SurfaceColor|float|0.0|1.0|1.0 | ||
Edge|float|0|0.2|1.0 | ||
PenWidth|float|0.01|1|1 | ||
MatCap|set|1|1|1 | ||
Material Capture Shader http://www.alecjacobson.com/weblog/?p=4827l|note | ||
//vert | ||
varying vec3 vN, vV; | ||
varying vec4 vP, vClr; | ||
|
||
void main() { | ||
vN = normalize(gl_NormalMatrix * gl_Normal); | ||
vV = -vec3(gl_ModelViewMatrix*gl_Vertex); | ||
vP = gl_Vertex; | ||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; | ||
vClr = gl_Color; | ||
} | ||
//frag | ||
uniform vec4 ClipPlane; | ||
uniform sampler2D MatCap; | ||
uniform float Brighten, SurfaceColor, Edge, PenWidth; | ||
varying vec3 vN, vV; | ||
varying vec4 vP, vClr; | ||
|
||
void main() { | ||
if ((ClipPlane[0] < 1.5) && (dot( ClipPlane, vP) > 0.0)) discard; | ||
vec3 n = normalize(vN); | ||
vec3 v = normalize(vV); | ||
float lightNormDot = abs(dot(n,v)); //with respect to viewer | ||
if (PenWidth < lightNormDot) discard; | ||
vec2 uv = n.xy * 0.5 + 0.5; | ||
vec3 clr = texture2D(MatCap,uv.xy).rgb; | ||
vec3 surf = mix(gl_FrontMaterial.ambient.rgb, vClr.rgb, vClr.a); | ||
surf = mix(vec3(0.67, 0.67, 0.67), surf, SurfaceColor); //0.67 as default Brighten is 1.5 | ||
clr = clr * surf * Brighten; | ||
clr *= min((lightNormDot - 0.5) * Edge, 0.0) + 1.0; | ||
gl_FragColor = vec4(clr.rgb, 1.0); | ||
} |
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
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
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
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
Oops, something went wrong.