Skip to content

Commit

Permalink
#86 Update process bloom at gamma color space
Browse files Browse the repository at this point in the history
  • Loading branch information
ducphamhong committed Oct 7, 2020
1 parent d31104d commit 3b82a4e
Show file tree
Hide file tree
Showing 46 changed files with 101 additions and 100 deletions.
2 changes: 1 addition & 1 deletion Assets/BuildShader.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def buildShader(dirName):
with open(inputFile, 'rt') as finput:
p.parse(finput.read(), inputFile)
with open(outputFile, 'w') as foutput:
foutput.writelines("// File Generated by Asset/BuildShader.py - source: [" + file + "]\n")
foutput.writelines("// File Generated by Assets/BuildShader.py - source: [" + file + "]\n")
p.write(foutput)


Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Basic/GLSL/TextureLinearRGBFS.glsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [TextureLinearRGBFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [TextureLinearRGBFS.d.glsl]
precision mediump float;
uniform sampler2D uTexDiffuse;
in vec2 varTexCoord0;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Basic/GLSL/TextureSRGBFS.glsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [TextureSRGBFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [TextureSRGBFS.d.glsl]
precision mediump float;
uniform sampler2D uTexDiffuse;
in vec2 varTexCoord0;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Basic/HLSL/TextureLinearRGBFS.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [TextureLinearRGBFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [TextureLinearRGBFS.d.hlsl]
Texture2D uTexDiffuse : register(t0);
SamplerState uTexDiffuseSampler : register(s0);
struct PS_INPUT
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Basic/HLSL/TextureSRGBFS.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [TextureSRGBFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [TextureSRGBFS.d.hlsl]
Texture2D uTexDiffuse : register(t0);
SamplerState uTexDiffuseSampler : register(s0);
struct PS_INPUT
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/GLSL/Burn2DFS.glsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [Burn2DFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [Burn2DFS.d.glsl]
precision highp float;
uniform vec4 uNoiseOffset;
in vec4 varColor;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/GLSL/Electric2DFS.glsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [Electric2DFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [Electric2DFS.d.glsl]
precision highp float;
uniform vec4 uNoiseOffset;
uniform vec4 uElectricColor;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/GLSL/Electric3DFS.glsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [Electric3DFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [Electric3DFS.d.glsl]
precision mediump float;
uniform vec4 uNoiseOffset;
uniform vec4 uElectricColor;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/GLSL/ElectricCircle2DFS.glsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [ElectricCircle2DFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [ElectricCircle2DFS.d.glsl]
precision highp float;
uniform vec4 uNoiseOffset;
uniform vec4 uElectricColor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [ElectricLightning2DFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [ElectricLightning2DFS.d.glsl]
precision highp float;
uniform vec4 uNoiseOffset;
uniform vec4 uElectricColor;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/GLSL/Noise2DFS.glsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [Noise2DFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [Noise2DFS.d.glsl]
precision highp float;
uniform vec4 uNoiseOffset;
in vec4 varColor;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/GLSL/Noise3DFS.glsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [Noise3DFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [Noise3DFS.d.glsl]
precision mediump float;
uniform vec4 uNoiseOffset;
in vec4 varColor;
Expand Down
1 change: 0 additions & 1 deletion Assets/BuiltIn/Shader/Noise/GLSL/StarSequence3DFS.d.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
precision mediump float;

uniform vec4 uNoiseOffset;
uniform vec4 uElectricColor;

in vec4 varColor;
in vec4 varWorldPos;
Expand Down
3 changes: 1 addition & 2 deletions Assets/BuiltIn/Shader/Noise/GLSL/StarSequence3DFS.glsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// File Generated by Asset/BuildShader.py - source: [StarSequence3DFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [StarSequence3DFS.d.glsl]
precision mediump float;
uniform vec4 uNoiseOffset;
uniform vec4 uElectricColor;
in vec4 varColor;
in vec4 varWorldPos;
out vec4 FragColor;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/HLSL/Burn2DFS.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [Burn2DFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [Burn2DFS.d.hlsl]
struct PS_INPUT
{
float4 pos : SV_POSITION;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/HLSL/Electric2DFS.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [Electric2DFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [Electric2DFS.d.hlsl]
struct PS_INPUT
{
float4 pos : SV_POSITION;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/HLSL/Electric3DFS.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [Electric3DFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [Electric3DFS.d.hlsl]
struct PS_INPUT
{
float4 pos : SV_POSITION;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/HLSL/ElectricCircle2DFS.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [ElectricCircle2DFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [ElectricCircle2DFS.d.hlsl]
struct PS_INPUT
{
float4 pos : SV_POSITION;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [ElectricLightning2DFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [ElectricLightning2DFS.d.hlsl]
struct PS_INPUT
{
float4 pos : SV_POSITION;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/HLSL/Noise2DFS.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [Noise2DFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [Noise2DFS.d.hlsl]
struct PS_INPUT
{
float4 pos : SV_POSITION;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Noise/HLSL/Noise3DFS.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [Noise3DFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [Noise3DFS.d.hlsl]
struct PS_INPUT
{
float4 pos : SV_POSITION;
Expand Down
1 change: 0 additions & 1 deletion Assets/BuiltIn/Shader/Noise/HLSL/StarSequence3DFS.d.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ struct PS_INPUT
cbuffer cbPerFrame
{
float4 uNoiseOffset;
float4 uElectricColor;
};

#include "LibNoise.hlsl"
Expand Down
3 changes: 1 addition & 2 deletions Assets/BuiltIn/Shader/Noise/HLSL/StarSequence3DFS.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [StarSequence3DFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [StarSequence3DFS.d.hlsl]
struct PS_INPUT
{
float4 pos : SV_POSITION;
Expand All @@ -9,7 +9,6 @@ struct PS_INPUT
cbuffer cbPerFrame
{
float4 uNoiseOffset;
float4 uElectricColor;
};
float hash(float3 p)
{
Expand Down
1 change: 0 additions & 1 deletion Assets/BuiltIn/Shader/Noise/StarSequence3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</vs>
<fs>
<uniform name="uNoiseOffset" type="MATERIAL_PARAM" valueIndex="0" value="0.0,0.0,0.0,4.0" float="4"/>
<uniform name="uElectricColor" type="MATERIAL_PARAM" valueIndex="1" value="0.2,0.1,0.4,1.0" float="4"/>
</fs>
</uniforms>
<shader type="GLSL" vs="GLSL/Noise3DVS.glsl" fs="GLSL/StarSequence3DFS.glsl"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [ParticleAdditiveFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [ParticleAdditiveFS.d.glsl]
precision mediump float;
uniform sampler2D uTexture;
in vec2 varTexCoord0;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Particle/GLSL/ParticleFS.glsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [ParticleFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [ParticleFS.d.glsl]
precision mediump float;
uniform sampler2D uTexture;
in vec2 varTexCoord0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [ParticleTrailTurbulenceVS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [ParticleTrailTurbulenceVS.d.glsl]
in vec4 inPosition;
in vec4 inColor;
in vec3 inNormal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [ParticleAdditiveFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [ParticleAdditiveFS.d.hlsl]
Texture2D uTexture : register(t0);
SamplerState uTextureSampler : register(s0);
struct PS_INPUT
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/Particle/HLSL/ParticleFS.hlsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [ParticleFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [ParticleFS.d.hlsl]
Texture2D uTexture : register(t0);
SamplerState uTextureSampler : register(s0);
struct PS_INPUT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [ParticleTrailTurbulenceVS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [ParticleTrailTurbulenceVS.d.hlsl]
struct VS_INPUT
{
float4 pos: POSITION;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/PostProcessing/GLSL/BloomFS.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void main(void)
// blur color
vec3 blur = texture(uBlurTex, varTexCoord0).rgb;

float intensity = 1.8;
float intensity = 1.0;
vec3 m = base + blur * intensity;

FragColor = vec4(m, 1.0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [PostEffectFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [PostEffectFS.d.glsl]
precision mediump float;
precision highp sampler2D;
precision highp sampler2DArray;
Expand Down
2 changes: 1 addition & 1 deletion Assets/BuiltIn/Shader/PostProcessing/HLSL/BloomFS.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ float4 main(PS_INPUT input) : SV_TARGET
// blur color
float3 blur = uBlurTex.Sample(uBlurTexSampler, input.tex0).rgb;

float intensity = 1.8;
float intensity = 1.0;
float3 m = base + blur * intensity;

return float4(m, 1.0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [PostEffectFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [PostEffectFS.d.hlsl]
Texture2D uTexColor : register(t0);
SamplerState uTexColorSampler : register(s0);
Texture2D uTexLuminance : register(t1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [SGLitFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [SGLitFS.d.glsl]
precision mediump float;
uniform sampler2D uTexDiffuse;
uniform sampler2D uTexNormal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [SGLitFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [SGLitFS.d.hlsl]
Texture2D uTexDiffuse : register(t0);
SamplerState uTexDiffuseSampler : register(s0);
Texture2D uTexNormalMap : register(t1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [SGDirectionalLightBakeFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [SGDirectionalLightBakeFS.d.glsl]
precision highp float;
precision highp sampler2D;
precision highp sampler2DArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [SGDirectionalLightFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [SGDirectionalLightFS.d.glsl]
precision highp float;
precision highp sampler2D;
precision highp sampler2DArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [SGPointLightFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [SGPointLightFS.d.glsl]
precision highp float;
precision highp sampler2D;
precision highp sampler2DArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [SGPointLightShadowFS.d.glsl]
// File Generated by Assets/BuildShader.py - source: [SGPointLightShadowFS.d.glsl]
precision highp float;
precision highp sampler2D;
precision highp sampler2DArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [SGDirectionalLightBakeFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [SGDirectionalLightBakeFS.d.hlsl]
Texture2D uTexAlbedo : register(t0);
SamplerState uTexAlbedoSampler : register(s0);
Texture2D uTexPosition : register(t1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [SGDirectionalLightFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [SGDirectionalLightFS.d.hlsl]
Texture2D uTexAlbedo : register(t0);
SamplerState uTexAlbedoSampler : register(s0);
Texture2D uTexPosition : register(t1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [SGPointLightFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [SGPointLightFS.d.hlsl]
Texture2D uTexPosition : register(t0);
SamplerState uTexPositionSampler : register(s0);
Texture2D uTexNormal : register(t1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File Generated by Asset/BuildShader.py - source: [SGPointLightShadowFS.d.hlsl]
// File Generated by Assets/BuildShader.py - source: [SGPointLightShadowFS.d.hlsl]
Texture2D uTexPosition : register(t0);
SamplerState uTexPositionSampler : register(s0);
Texture2D uTexNormal : register(t1);
Expand Down
Loading

0 comments on commit 3b82a4e

Please sign in to comment.