Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/hlsl #75

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion animation/spriteLoop.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: sample a frame on a sprite sheet
use: <SPRITELOOP_TYPE> SpriteLOOP(<sampler2D >tex, <float2> st, <float2> grid, <float> frame)
options:
- SAMPLER_FNC(TEX, UV)
- SAMPLESPRITE_TYPE: vec4
- SAMPLESPRITE_TYPE: float4
- SAMPLESPRITE_SAMPLER_FNC(UV)
*/

Expand Down
2 changes: 1 addition & 1 deletion color/levels/outputRange.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use: levelsOutputRange(<float3|float4> color, float minOutput, float maxOutput)
#ifndef FNC_LEVELSOUTPUTRANGE
#define FNC_LEVELSOUTPUTRANGE
float3 levelsOutputRange(in float3 color, in float3 minOutput, in float3 maxOutput) {
return mix(minOutput, maxOutput, color);
return lerp(minOutput, maxOutput, color);
}

float4 levelsOutputRange(in float4 color, in float3 minOutput, in float3 maxOutput) {
Expand Down
2 changes: 1 addition & 1 deletion color/mixSpectral.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,6 @@ float3 mixSpectral(float3 colA, float3 colB, float t) {
}

float4 mixSpectral( float4 colA, float4 colB, float h ) {
return float4( mixSpectral(colA.rgb, colB.rgb, h), mix(colA.a, colB.a, h) );
return float4( mixSpectral(colA.rgb, colB.rgb, h), lerp(colA.a, colB.a, h) );
}
#endif
2 changes: 1 addition & 1 deletion color/space/YPbPr2rgb.hlsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
original_author: Patricio Gonzalez Vivo
description: pass a color in RGB and get it in YPbPr from http://www.equasys.de/colorconversion.html
use: YPbPr2RGB(<float3|vec4> color)
use: YPbPr2RGB(<float3|float4> color)
*/

#ifndef FNC_YPBPR2RGB
Expand Down
4 changes: 2 additions & 2 deletions color/space/lab2xyz.hlsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
original_author: Patricio Gonzalez Vivo
description: Converts a Lab color to XYZ color space.
use: rgb2xyz(<float3|vec4> color)
use: rgb2xyz(<float3|float4> color)
*/

#ifndef FNC_LAB2XYZ
Expand All @@ -16,5 +16,5 @@ float3 lab2xyz(in float3 c) {
return float3(95.047, 100.000, 108.883) * lerp(c0, c1, step(f, float3(0.206897, 0.206897, 0.206897)));
}

vec4 lab2xyz(in vec4 c) { return vec4(lab2xyz(c.xyz), c.w); }
float4 lab2xyz(in float4 c) { return float4(lab2xyz(c.xyz), c.w); }
#endif
2 changes: 1 addition & 1 deletion color/space/rgb2YPbPr.hlsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
original_author: Patricio Gonzalez Vivo
description: pass a color in RGB and get it in YPbPr from http://www.equasys.de/colorconversion.html
use: rgb2YPbPr(<float3|vec4> color)
use: rgb2YPbPr(<float3|float4> color)
*/

#ifndef FNC_RGB2YPBPR
Expand Down
4 changes: 2 additions & 2 deletions color/space/rgb2hsv.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ float3 rgb2hsv(in float3 c) {
float4 K = float4(0., -.33333333333333333333, .6666666666666666666, -1.);

#ifdef RGB2HSV_MIX
float4 p = mix(float4(c.bg, K.wz), float4(c.gb, K.xy), step(c.b, c.g));
float4 q = mix(float4(p.xyw, c.r), float4(c.r, p.yzx), step(p.x, c.r));
float4 p = lerp(float4(c.bg, K.wz), float4(c.gb, K.xy), step(c.b, c.g));
float4 q = lerp(float4(p.xyw, c.r), float4(c.r, p.yzx), step(p.x, c.r));
#else
float4 p = c.g < c.b ? float4(c.bg, K.wz) : float4(c.gb, K.xy);
float4 q = c.r < p.x ? float4(p.xyw, c.r) : float4(c.r, p.yzx);
Expand Down
4 changes: 2 additions & 2 deletions color/space/rgb2hue.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ float rgb2hue(in float3 c) {
float4 K = float4(0., -.33333333333333333333, .6666666666666666666, -1.);

#ifdef RGB2HSV_MIX
float4 p = mix(float4(c.bg, K.wz), float4(c.gb, K.xy), step(c.b, c.g));
float4 q = mix(float4(p.xyw, c.r), float4(c.r, p.yzx), step(p.x, c.r));
float4 p = lerp(float4(c.bg, K.wz), float4(c.gb, K.xy), step(c.b, c.g));
float4 q = lerp(float4(p.xyw, c.r), float4(c.r, p.yzx), step(p.x, c.r));
#else
float4 p = c.g < c.b ? float4(c.bg, K.wz) : float4(c.gb, K.xy);
float4 q = c.r < p.x ? float4(p.xyw, c.r) : float4(c.r, p.yzx);
Expand Down
2 changes: 1 addition & 1 deletion color/whiteBalance.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ float3 whiteBalance(in float3 rgb, in float temperature, in float tint) {
(rgb.g < 0.5 ? (2.0 * rgb.g * warmFilter.g) : (1.0 - 2.0 * (1.0 - rgb.g) * (1.0 - warmFilter.g))),
(rgb.b < 0.5 ? (2.0 * rgb.b * warmFilter.b) : (1.0 - 2.0 * (1.0 - rgb.b) * (1.0 - warmFilter.b))) );

return mix(rgb, processed, temperature * 0.5);
return lerp(rgb, processed, temperature * 0.5);

#else
// Get the CIE xy chromaticity of the reference white point.
Expand Down
2 changes: 1 addition & 1 deletion distort/barrel.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use: barrel(sampler2D tex, <float2> st, [, <float2|float> sdf])
options:
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
- BARREL_DISTANCE: function used to shape the distortion, defaults to radial shape with lengthSq
- BARREL_TYPE: return type, defaults to vec3
- BARREL_TYPE: return type, defaults to float3
- BARREL_SAMPLER_FNC: function used to sample the input texture, defaults to texture2D(TEX, UV).rgb
- BARREL_OCT_1: one octave of distortion
- BARREL_OCT_2: two octaves of distortion
Expand Down
2 changes: 1 addition & 1 deletion distort/grain.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use:
- grain(<sampler2D> texture, <float2> texCoord, <float|float2> resolution [, <float> t, <float> multiplier])
options:
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
- GRAIN_TYPE: type of the returned value (vec3 by default)
- GRAIN_TYPE: type of the returned value (float3 by default)
- GRAIN_SAMPLER_FNC: grain function for sampler2D
*/

Expand Down
4 changes: 2 additions & 2 deletions distort/stretch.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use: stretch(<sampler2D> tex, <float2> st, <float2> direction [, int samples])
options:
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
- STRETCH_SAMPLES: number of samples taken, defaults to 20
- STRETCH_TYPE: return type, defauls to vec4
- STRETCH_TYPE: return type, defauls to float4
- STRETCH_SAMPLER_FNC(TEX, UV): function used to sample the input texture, defaults to texture2D(tex, TEX, UV)
- STRETCH_WEIGHT: shaping equation to multiply the sample weight.
*/
Expand All @@ -17,7 +17,7 @@ options:
#endif

#ifndef STRETCH_TYPE
#define STRETCH_TYPE vec4
#define STRETCH_TYPE float4
#endif

#ifndef STRETCH_SAMPLER_FNC
Expand Down
2 changes: 1 addition & 1 deletion draw/flip.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ use: flip(<float> v, <float> pct)
#ifndef FNC_FLIP
#define FNC_FLIP
float flip(in float v, in float pct) {
return mix(v, 1. - v, pct);
return lerp(v, 1. - v, pct);
}
#endif
2 changes: 1 addition & 1 deletion filter/kuwahara.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ original_author: [Brad Larson, Ben Cochran, Hugues Lismonde, Keitaroh Kobayashi,
description: Kuwahara image abstraction, drawn from the work of Kyprianidis, et. al. in their publication "Anisotropic Kuwahara Filtering on the GPU" within the GPU Pro collection. This produces an oil-painting-like image, but it is extremely computationally expensive, so it can take seconds to render a frame on an iPad 2. This might be best used for still images.
use: kuwahara(<sampler2D> texture, <float2> st, <float2> pixel)
options:
- KUWAHARA_TYPE: defaults to vec3
- KUWAHARA_TYPE: defaults to float3
- KUWAHARA_SAMPLER_FNC(TEX, UV): defaults to texture2D(tex, TEX, UV).rgb
- KUWAHARA_RADIUS radius
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
Expand Down
6 changes: 3 additions & 3 deletions filter/laplacian.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ bool laplacian_isOutside(float2 pos) {
LAPLACIAN_TYPE laplacian_w4(sampler2D tex, float2 st, float2 pixel, float pixel_pad) {
LAPLACIAN_TYPE acc = float4(0.0, 0.0, 0.0, 0.0);
float2 uv = st * float2(1.0 + pixel_pad * 2.0 * pixel) - pixel_pad * pixel;
vec3 pixelShift = vec3(pixel, 0.0);
float3 pixelShift = float3(pixel, 0.0);

if (!laplacian_isOutside(uv)) acc = 4.0 * LAPLACIAN_SAMPLER_FNC(tex, uv);
float2 e = uv + pixelShift.xz;
Expand All @@ -103,7 +103,7 @@ LAPLACIAN_TYPE laplacian_w4(sampler2D tex, float2 st, float2 pixel, float pixel_
LAPLACIAN_TYPE laplacian_w8(sampler2D tex, float2 st, float2 pixel, float pixel_pad) {
LAPLACIAN_TYPE acc = float4(0.0, 0.0, 0.0, 0.0);
float2 uv = st * float2(1.0 + pixel_pad * 2.0 * pixel) - pixel_pad * pixel;
vec3 pixelShift = vec3(pixel, 0.0);
float3 pixelShift = float3(pixel, 0.0);

if (!laplacian_isOutside(uv)) acc = 8.0 * LAPLACIAN_SAMPLER_FNC(tex, uv);
float2 e = uv + pixelShift.xz;
Expand All @@ -130,7 +130,7 @@ LAPLACIAN_TYPE laplacian_w8(sampler2D tex, float2 st, float2 pixel, float pixel_
LAPLACIAN_TYPE laplacian_w12(sampler2D tex, float2 st, float2 pixel, float pixel_pad) {
LAPLACIAN_TYPE acc = float4(0.0, 0.0, 0.0, 0.0);
float2 uv = st * float2(1.0 + pixel_pad * 2.0 * pixel) - pixel_pad * pixel;
vec3 pixelShift = vec3(pixel, 0.0);
float3 pixelShift = float3(pixel, 0.0);

if (!laplacian_isOutside(uv)) acc = 12.0 * LAPLACIAN_SAMPLER_FNC(tex, uv);

Expand Down
2 changes: 1 addition & 1 deletion filter/mean.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ original_author: Brad Larson
description: adapted version of mean average sampling on four coorners of a sampled point from https://github.com/BradLarson/GPUImage2
use: mean(<sampler2D> texture, <float2> st, <float2> pixel)
options:
- MEAN_TYPE: defaults to vec4
- MEAN_TYPE: defaults to float4
- AVERAGE_SAMPLER_FNC(TEX, UV): defaults to texture2D(tex,TEX, UV)
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
*/
Expand Down
2 changes: 1 addition & 1 deletion filter/sharpen/fast.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use: sharpen(<sampler2D> texture, <float2> st, <float2> pixel)
options:
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
- SHARPENFAST_KERNELSIZE: Defaults 2
- SHARPENFAST_TYPE: defaults to vec3
- SHARPENFAST_TYPE: defaults to float3
- SHARPENFAST_SAMPLER_FNC(TEX, UV): defaults to texture2D(tex, TEX, UV).rgb
*/

Expand Down
2 changes: 1 addition & 1 deletion geometry/aabb/contain.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*
original_author: P
description: Compute if point is inside AABB
use: <bool> inside(<AABB> box, <vec3> point )
use: <bool> inside(<AABB> box, <float3> point )
*/

#ifndef FNC_AABB_CONTAIN
Expand Down
2 changes: 1 addition & 1 deletion lighting/common/henyeyGreenstein.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ float henyeyGreenstein(float mu, float g) {
}

float henyeyGreenstein(float mu, float g, float dual_lobe_weight) {
return mix(henyeyGreenstein( mu, -g), henyeyGreenstein(mu, g), dual_lobe_weight);
return lerp(henyeyGreenstein( mu, -g), henyeyGreenstein(mu, g), dual_lobe_weight);
}
#endif
2 changes: 1 addition & 1 deletion lighting/diffuse.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*
original_author: Patricio Gonzalez Vivo
description: calculate diffuse contribution
use: lightSpot(<float3> _diffuseColor, <vec3> _specularColor, <vec3> _N, <vec3> _V, <float> _NoV, <float> _f0, out <vec3> _diffuse, out <vec3> _specular)
use: lightSpot(<float3> _diffuseColor, <float3> _specularColor, <float3> _N, <float3> _V, <float> _NoV, <float> _f0, out <float3> _diffuse, out <float3> _specular)
options:
- DIFFUSE_FNC: diffuseOrenNayar, diffuseBurley, diffuseLambert (default)
*/
Expand Down
4 changes: 2 additions & 2 deletions lighting/material/albedo.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ float4 materialAlbedo() {
float4 base = float4(0.5, 0.5, 0.5, 1.0);

#if defined(MATERIAL_BASECOLORMAP) && defined(MODEL_VERTEX_TEXCOORD)
vec2 uv = v_texcoord.xy;
float2 uv = v_texcoord.xy;
#if defined(MATERIAL_BASECOLORMAP_OFFSET)
uv += (MATERIAL_BASECOLORMAP_OFFSET).xy;
#endif
Expand All @@ -34,7 +34,7 @@ float4 materialAlbedo() {
base = gamma2linear( SAMPLER_FNC(MATERIAL_BASECOLORMAP, uv) );

#elif defined(MATERIAL_ALBEDOMAP) && defined(MODEL_VERTEX_TEXCOORD)
vec2 uv = v_texcoord.xy;
float2 uv = v_texcoord.xy;
#if defined(MATERIAL_ALBEDOMAP_OFFSET)
uv += (MATERIAL_ALBEDOMAP_OFFSET).xy;
#endif
Expand Down
4 changes: 2 additions & 2 deletions lighting/material/emissive.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/*
original_author: Patricio Gonzalez Vivo
description: get material emissive property from GlslViewer's defines https://github.com/patriciogonzalezvivo/glslViewer/wiki/GlslViewer-DEFINES#material-defines
use: vec4 materialEmissive()
use: float4 materialEmissive()
options:
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
*/
Expand All @@ -20,7 +20,7 @@ float3 materialEmissive() {
float3 emission = float3(0.0, 0.0, 0.0);

#if defined(MATERIAL_EMISSIVEMAP) && defined(MODEL_VERTEX_TEXCOORD)
vec2 uv = v_texcoord.xy;
float2 uv = v_texcoord.xy;
#if defined(MATERIAL_EMISSIVEMAP_OFFSET)
uv += (MATERIAL_EMISSIVEMAP_OFFSET).xy;
#endif
Expand Down
2 changes: 1 addition & 1 deletion lighting/material/metallic.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/*
original_author: Patricio Gonzalez Vivo
description: get material metalic property from GlslViewer's defines https://github.com/patriciogonzalezvivo/glslViewer/wiki/GlslViewer-DEFINES#material-defines
use: vec4 materialMetallic()
use: float4 materialMetallic()
options:
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
*/
Expand Down
4 changes: 2 additions & 2 deletions lighting/material/new.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ options:

#ifndef SHADOW_INIT
#if defined(LIGHT_SHADOWMAP) && defined(LIGHT_SHADOWMAP_SIZE) && defined(LIGHT_COORD)
#define SHADOW_INIT shadow(LIGHT_SHADOWMAP, vec2(LIGHT_SHADOWMAP_SIZE), (LIGHT_COORD).xy, (LIGHT_COORD).z)
#define SHADOW_INIT shadow(LIGHT_SHADOWMAP, float2(LIGHT_SHADOWMAP_SIZE), (LIGHT_COORD).xy, (LIGHT_COORD).z)
#else
#define SHADOW_INIT 1.0
#endif
Expand All @@ -50,7 +50,7 @@ void materialNew(out Material _mat) {
_mat.normal = materialNormal();

#if defined(SCENE_BACK_SURFACE) && defined(RESOLUTION)
vec4 back_surface = SAMPLER_FNC(SCENE_BACK_SURFACE, gl_FragCoord.xy / RESOLUTION);
float4 back_surface = SAMPLER_FNC(SCENE_BACK_SURFACE, gl_FragCoord.xy / RESOLUTION);
_mat.normal_back = back_surface.xyz;
#if defined(SHADING_MODEL_SUBSURFACE)
_mat.thickness = saturate(gl_FragCoord.z - back_surface.a);
Expand Down
2 changes: 1 addition & 1 deletion lighting/material/normal.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
original_author: Patricio Gonzalez Vivo
description: get material normal property from GlslViewer's defines https://github.com/patriciogonzalezvivo/glslViewer/wiki/GlslViewer-DEFINES#material-defines
use: vec4 materialNormal()
use: float4 materialNormal()
options:
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
*/
Expand Down
2 changes: 1 addition & 1 deletion lighting/material/occlusion.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
original_author: Patricio Gonzalez Vivo
description: get material normal property from GlslViewer's defines https://github.com/patriciogonzalezvivo/glslViewer/wiki/GlslViewer-DEFINES#material-defines
use: vec4 materialOcclusion()
use: float4 materialOcclusion()
options:
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
*/
Expand Down
2 changes: 1 addition & 1 deletion lighting/material/roughness.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
original_author: Patricio Gonzalez Vivo
description: get material roughness property from GlslViewer's defines https://github.com/patriciogonzalezvivo/glslViewer/wiki/GlslViewer-DEFINES#material-defines
use: vec4 materialRoughness()
use: float4 materialRoughness()
options:
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
*/
Expand Down
2 changes: 1 addition & 1 deletion lighting/material/shininess.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*
original_author: Patricio Gonzalez Vivo
description: get material shininess property from GlslViewer's defines https://github.com/patriciogonzalezvivo/glslViewer/wiki/GlslViewer-DEFINES#material-defines
use: vec4 materialShininess()
use: float4 materialShininess()
*/

#ifndef FNC_MATERIAL_SHININESS
Expand Down
2 changes: 1 addition & 1 deletion lighting/material/specular.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
original_author: Patricio Gonzalez Vivo
description: get material specular property from GlslViewer's defines https://github.com/patriciogonzalezvivo/glslViewer/wiki/GlslViewer-DEFINES#material-defines
use: vec4 materialMetallic()
use: float4 materialMetallic()
options:
- SAMPLER_FNC(TEX, UV): optional depending the target version of GLSL (texture2D(...) or texture(...))
- MATERIAL_SPECULARMAP
Expand Down
2 changes: 1 addition & 1 deletion lighting/pbr.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ float4 pbr(const Material _mat) {
// ------------------------
float ssao = 1.0;
// #if defined(FNC_SSAO) && defined(SCENE_DEPTH) && defined(RESOLUTION) && defined(CAMERA_NEAR_CLIP) && defined(CAMERA_FAR_CLIP)
// vec2 pixel = 1.0/RESOLUTION;
// float2 pixel = 1.0/RESOLUTION;
// ssao = ssao(SCENE_DEPTH, gl_FragCoord.xy*pixel, pixel, 1.);
// #endif
float diffAO = min(_mat.ambientOcclusion, ssao);
Expand Down
2 changes: 1 addition & 1 deletion lighting/pbrClearCoat.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ float4 pbrClearCoat(const Material _mat) {
// ------------------------
float ssao = 1.0;
// #if defined(FNC_SSAO) && defined(SCENE_DEPTH) && defined(RESOLUTION) && defined(CAMERA_NEAR_CLIP) && defined(CAMERA_FAR_CLIP)
// vec2 pixel = 1.0/RESOLUTION;
// float2 pixel = 1.0/RESOLUTION;
// ssao = ssao(SCENE_DEPTH, gl_FragCoord.xy*pixel, pixel, 1.);
// #endif
float diffuseAO = min(_mat.ambientOcclusion, ssao);
Expand Down
2 changes: 1 addition & 1 deletion lighting/pbrGlass.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
original_author: Patricio Gonzalez Vivo
description: simple glass shading model
use:
- <vec4> glass(<Material> material)
- <float4> glass(<Material> material)

options:
- SPECULAR_FNC: specularGaussian, specularBeckmann, specularCookTorrance (default), specularPhongRoughness, specularBlinnPhongRoughnes (default on mobile)
Expand Down
2 changes: 1 addition & 1 deletion lighting/raymarch/map.hlsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
original_author: Inigo Quiles
description: map of SDF functions to be declare
use: <float4> raymarchMap( in <vec3> pos )
use: <float4> raymarchMap( in <float3> pos )
*/

#ifndef RAYMARCH_MAP_FNC
Expand Down
2 changes: 1 addition & 1 deletion lighting/shadow.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ original_author: Patricio Gonzalez Vivo
description: sample shadow map using PCF
use:
- <float> sampleShadowPCF(<sampler2D> depths, <float2> size, <float2> uv, <float> compare)
- <float> sampleShadowPCF(<vec3> lightcoord)
- <float> sampleShadowPCF(<float3> lightcoord)
options:
- SHADOWMAP_BIAS
*/
Expand Down
Loading