Film grain and empty SSS
This commit is contained in:
parent
da8d2521dc
commit
c1023ac03b
|
@ -11,7 +11,7 @@ in vec2 texCoord;
|
|||
void main() {
|
||||
vec4 col = texture(tex, texCoord);
|
||||
float brightness = dot(col.rgb, vec3(0.2126, 0.7152, 0.0722));
|
||||
if (brightness > 1.3) {
|
||||
if (brightness > 1.7) {
|
||||
gl_FragColor.rgb = vec3(col.rgb);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@ uniform vec3 light;
|
|||
uniform mat4 VP;
|
||||
#endif
|
||||
|
||||
// uniform float time;
|
||||
|
||||
in vec2 texCoord;
|
||||
|
||||
const float PI = 3.1415926535;
|
||||
|
@ -195,6 +197,12 @@ void main() {
|
|||
// col.rgb += lensflarecol;
|
||||
// }
|
||||
|
||||
// Film grain
|
||||
// const float grainStrength = 4.0;
|
||||
// float x = (texCoord.x + 4.0) * (texCoord.y + 4.0 ) * (time * 10.0);
|
||||
// vec4 grain = vec4(mod((mod(x, 13.0) + 1.0) * (mod(x, 123.0) + 1.0), 0.01)-0.005) * grainStrength;
|
||||
// col += grain;
|
||||
|
||||
// Vignetting
|
||||
col *= vignette();
|
||||
|
||||
|
|
16
raw/sss_pass/sss_pass.frag.glsl
Normal file
16
raw/sss_pass/sss_pass.frag.glsl
Normal file
|
@ -0,0 +1,16 @@
|
|||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
uniform sampler2D gbuffer0;
|
||||
uniform sampler2D gbuffer1;
|
||||
uniform sampler2D tex;
|
||||
|
||||
in vec2 texCoord;
|
||||
|
||||
void main() {
|
||||
|
||||
|
||||
}
|
25
raw/sss_pass/sss_pass.shader.json
Executable file
25
raw/sss_pass/sss_pass.shader.json
Executable file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"contexts": [
|
||||
{
|
||||
"id": "sss_pass",
|
||||
"params": [
|
||||
{
|
||||
"id": "depth_write",
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"id": "compare_mode",
|
||||
"value": "always"
|
||||
},
|
||||
{
|
||||
"id": "cull_mode",
|
||||
"value": "none"
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"texture_params": [],
|
||||
"vertex_shader": "sss_pass.vert.glsl",
|
||||
"fragment_shader": "sss_pass.frag.glsl"
|
||||
}
|
||||
]
|
||||
}
|
18
raw/sss_pass/sss_pass.vert.glsl
Normal file
18
raw/sss_pass/sss_pass.vert.glsl
Normal file
|
@ -0,0 +1,18 @@
|
|||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
||||
in vec2 pos;
|
||||
|
||||
out vec2 texCoord;
|
||||
|
||||
const vec2 madd = vec2(0.5, 0.5);
|
||||
|
||||
void main() {
|
||||
// Scale vertex attribute to [0-1] range
|
||||
texCoord = pos.xy * madd + madd;
|
||||
|
||||
gl_Position = vec4(pos.xy, 0.0, 1.0);
|
||||
}
|
10
tools/brython/LICENCE.txt
Executable file
10
tools/brython/LICENCE.txt
Executable file
|
@ -0,0 +1,10 @@
|
|||
Copyright (c) 2012, Pierre Quentel pierre.quentel@gmail.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
10746
tools/brython/brython.js
Normal file
10746
tools/brython/brython.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -14,48 +14,48 @@ CMFT=./cmft-osx
|
|||
#eval $CMFT --printCLDevices
|
||||
|
||||
# Typical parameters for irradiance filter.
|
||||
#eval $CMFT $@ --input "okretnica.tga" \
|
||||
# eval $CMFT $@ --input "test.jpg" \
|
||||
# --filter irradiance \
|
||||
# --srcFaceSize 0 \
|
||||
# --dstFaceSize 0 \
|
||||
# --outputNum 1 \
|
||||
# --output0 "okretnica_irr" \
|
||||
# --output0params dds,bgra8,cubemap
|
||||
# --output0 "test_irr" \
|
||||
# --output0params hdr,rgbe,latlong
|
||||
|
||||
# Typical parameters for generating spherical harmonics coefficients.
|
||||
#eval $CMFT $@ --input "okretnica.tga" \
|
||||
# --filter shcoeffs \
|
||||
# --outputNum 1 \
|
||||
# --output0 "okretnica"
|
||||
# eval $CMFT $@ --input "test.jpg" \
|
||||
# --filter shcoeffs \
|
||||
# --outputNum 1 \
|
||||
# --output0 "test"
|
||||
|
||||
# Typical parameters for radiance filter.
|
||||
# eval $CMFT $@ --input "envmap.jpg" \
|
||||
# ::Filter options \
|
||||
# --filter radiance \
|
||||
# --srcFaceSize 256 \
|
||||
# --excludeBase false \
|
||||
# --mipCount 7 \
|
||||
# --glossScale 10 \
|
||||
# --glossBias 3 \
|
||||
# --lightingModel blinnbrdf \
|
||||
# --edgeFixup none \
|
||||
# --dstFaceSize 256 \
|
||||
# ::Processing devices \
|
||||
# --numCpuProcessingThreads 4 \
|
||||
# --useOpenCL true \
|
||||
# --clVendor anyGpuVendor \
|
||||
# --deviceType gpu \
|
||||
# --deviceIndex 0 \
|
||||
# ::Aditional operations \
|
||||
# --inputGammaNumerator 2.2 \
|
||||
# --inputGammaDenominator 1.0 \
|
||||
# --outputGammaNumerator 1.0 \
|
||||
# --outputGammaDenominator 2.2 \
|
||||
# --generateMipChain true \
|
||||
# ::Output \
|
||||
# --outputNum 1 \
|
||||
# --output0 "envmap_rad" \
|
||||
# --output0params hdr,rgbe,latlong \
|
||||
eval $CMFT $@ --input "test.jpg" \
|
||||
::Filter options \
|
||||
--filter radiance \
|
||||
--srcFaceSize 64 \
|
||||
--excludeBase false \
|
||||
--mipCount 7 \
|
||||
--glossScale 10 \
|
||||
--glossBias 3 \
|
||||
--lightingModel blinnbrdf \
|
||||
--edgeFixup none \
|
||||
--dstFaceSize 64 \
|
||||
::Processing devices \
|
||||
--numCpuProcessingThreads 4 \
|
||||
--useOpenCL true \
|
||||
--clVendor anyGpuVendor \
|
||||
--deviceType gpu \
|
||||
--deviceIndex 0 \
|
||||
::Aditional operations \
|
||||
--inputGammaNumerator 2.2 \
|
||||
--inputGammaDenominator 1.0 \
|
||||
--outputGammaNumerator 1.0 \
|
||||
--outputGammaDenominator 2.2 \
|
||||
--generateMipChain true \
|
||||
::Output \
|
||||
--outputNum 1 \
|
||||
--output0 "envmap_rad" \
|
||||
--output0params hdr,rgbe,latlong \
|
||||
# --output1 "okretnica_pmrem" \
|
||||
# --output1params ktx,rgba8,cubemap
|
||||
|
||||
|
@ -167,10 +167,10 @@ CMFT=./cmft-osx
|
|||
# --output3 "cmft_facelist" --output3params tga,bgra8,facelist \
|
||||
# --output4 "cmft_latlong" --output4params hdr,rgbe,latlong
|
||||
|
||||
eval $CMFT $@ --input "shrine.hdr" \
|
||||
--filter none \
|
||||
::Output \
|
||||
--outputNum 1 \
|
||||
--dstFaceSize 0 \
|
||||
--output0 "test" \
|
||||
--output0params hdr,rgbe,latlong
|
||||
# eval $CMFT $@ --input "shrine.hdr" \
|
||||
# --filter none \
|
||||
# ::Output \
|
||||
# --outputNum 1 \
|
||||
# --dstFaceSize 0 \
|
||||
# --output0 "test" \
|
||||
# --output0params hdr,rgbe,latlong
|
Loading…
Reference in a new issue