docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
listlengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
// Setup the default processing configuration to the scene. this._attachImageProcessingConfiguration(null);
<mask> null, textureType, "postprocess", null, true); <mask> <mask> this._updateParameters(); <mask> <mask> this.onApply = (effect: Effect) => { <mask> this.imageProcessingConfiguration.bind(effect, this.aspectRatio); </s> imag...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/PostProcess/babylon.imageProcessingPostProcess.ts
this.imageProcessingConfiguration.bind(effect, this.aspectRatio);
<mask> <mask> this._updateParameters(); <mask> <mask> this.onApply = (effect: Effect) => { <mask> let aspectRatio = this.aspectRatio; <mask> <mask> // Color <mask> if (this._colorCurvesEnabled) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/PostProcess/babylon.imageProcessingPostProcess.ts
this._defines.FROMLINEARSPACE = this._fromLinearSpace; this.imageProcessingConfiguration.prepareDefines(this._defines);
<mask> } <mask> <mask> protected _updateParameters(): void { <mask> var defines = ""; <mask> for (const define in this._defines) { <mask> if (this._defines[define]) { <mask> defines += `#define ${define};\r\n`; </s> image processing to...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/PostProcess/babylon.imageProcessingPostProcess.ts
for (const define in this._defines) { if (this._defines[define]) { defines += `#define ${define};\r\n`;
<mask> } <mask> <mask> protected _updateParameters(): void { <mask> var defines = ""; <mask> var samplers = ["textureSampler"]; <mask> <mask> if (this.colorGradingTexture) { <mask> defines = "#define COLORGRADING\r\n"; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/PostProcess/babylon.imageProcessingPostProcess.ts
var samplers = ["textureSampler"]; ImageProcessing.PrepareSamplers(samplers, this._defines);
<mask> defines += "#define VIGNETTEBLENDMODEOPAQUE\r\n"; <mask> } <mask> } <mask> <mask> if (this.cameraToneMappingEnabled) { <mask> defines += "#define TONEMAPPING\r\n"; <mask> } <mask> <mask> if (this._color...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "k...
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/PostProcess/babylon.imageProcessingPostProcess.ts
var uniforms = []; ImageProcessing.PrepareUniforms(uniforms, this._defines);
<mask> // Statics <mask> private static _VIGNETTEMODE_MULTIPLY = 0; <mask> private static _VIGNETTEMODE_OPAQUE = 1; <mask> <mask> public static get VIGNETTEMODE_MULTIPLY(): number { <mask> return ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY; <mask> } <ma...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/PostProcess/babylon.imageProcessingPostProcess.ts
this.updateEffect(defines, uniforms, samplers);
<mask> public static get VIGNETTEMODE_MULTIPLY(): number { <mask> return ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY; <mask> } <mask> <mask> public static get VIGNETTEMODE_OPAQUE(): number { <mask> return ImageProcessingPostProcess._VIGNETTEMODE_OPAQUE; <mas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/PostProcess/babylon.imageProcessingPostProcess.ts
<mask> #ifdef MICROSURFACEMAP <mask> uniform vec2 vMicroSurfaceSamplerInfos; <mask> #endif <mask> <mask> #ifdef OPACITYFRESNEL <mask> uniform vec4 opacityParts; <mask> #endif <mask> <mask> #ifdef EMISSIVEFRESNEL <mask> uniform vec4 emissiveLeftColor; <mask> uniform vec4 emissiveRightColor; <mask> #endif ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/ShadersInclude/pbrFragmentDeclaration.fx
<mask> #define RECIPROCAL_PI2 0.15915494 <mask> #define FRESNEL_MAXIMUM_ON_ROUGH 0.25 <mask> <mask> // PBR CUSTOM CONSTANTS <mask> const float kPi = 3.1415926535897932384626433832795; <mask> const float kRougnhessToAlphaScale = 0.1; <mask> const float kRougnhessToAlphaOffset = 0.29248125; <mask> <mask> float...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/ShadersInclude/pbrFunctions.fx
<mask> const float kPi = 3.1415926535897932384626433832795; <mask> const float kRougnhessToAlphaScale = 0.1; <mask> const float kRougnhessToAlphaOffset = 0.29248125; <mask> <mask> float Square(float value) <mask> { <mask> return value * value; <mask> } <mask> <mask> float getLuminance(vec3 color) <mask...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/ShadersInclude/pbrFunctions.fx
float alphaG = square(roughness) + kMinimumVariance;
<mask> float convertRoughnessToAverageSlope(float roughness) <mask> { <mask> // Calculate AlphaG as square of roughness; add epsilon to avoid numerical issues <mask> const float kMinimumVariance = 0.0005; <mask> float alphaG = Square(roughness) + kMinimumVariance; <mask> return alphaG; <mask> } ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/ShadersInclude/pbrFunctions.fx
float a2 = square(alphaG);
<mask> { <mask> // Note: alphaG is average slope (gradient) of the normals in slope-space. <mask> // It is also the (trigonometric) tangent of the median distribution value, i.e. 50% of normals have <mask> // a tangent (gradient) closer to the macrosurface than this slope. <mask> float a2 = Square(...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/ShadersInclude/pbrFunctions.fx
return a2 / (PI * d * d);
<mask> // It is also the (trigonometric) tangent of the median distribution value, i.e. 50% of normals have <mask> // a tangent (gradient) closer to the macrosurface than this slope. <mask> float a2 = Square(alphaG); <mask> float d = NdotH * NdotH * (a2 - 1.0) + 1.0; <mask> return a2 / (kPi * d...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/ShadersInclude/pbrFunctions.fx
vec3 fresnelSchlickEnvironmentGGX(float VdotN, vec3 reflectance0, vec3 reflectance90, float smoothness)
<mask> { <mask> return reflectance0 + (reflectance90 - reflectance0) * pow(clamp(1.0 - VdotH, 0., 1.), 5.0); <mask> } <mask> <mask> vec3 FresnelSchlickEnvironmentGGX(float VdotN, vec3 reflectance0, vec3 reflectance90, float smoothness) <mask> { <mask> // Schlick fresnel approximation, extended with basi...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/ShadersInclude/pbrFunctions.fx
return fresnel * NdotL / PI;
<mask> float fresnel = <mask> (1.0 + (diffuseFresnel90 - 1.0) * diffuseFresnelNL) * <mask> (1.0 + (diffuseFresnel90 - 1.0) * diffuseFresnelNV); <mask> <mask> return fresnel * NdotL / kPi; <mask> } <mask> <mask> float adjustRoughnessFromLightProperties(float roughness, float lightRadius...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/ShadersInclude/pbrFunctions.fx
<mask> <mask> return microSurface; <mask> } <mask> <mask> vec3 toLinearSpace(vec3 color) <mask> { <mask> return vec3(pow(color.r, 2.2), pow(color.g, 2.2), pow(color.b, 2.2)); <mask> } <mask> <mask> vec3 toGammaSpace(vec3 color) <mask> { <mask> return vec3(pow(color.r, 1.0 / 2.2), pow(color.g,...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/ShadersInclude/pbrFunctions.fx
<mask> <mask> uniform vec2 vMicrosurfaceTextureLods; <mask> uniform vec4 vReflectivityColor; <mask> uniform vec3 vEmissiveColor; <mask> uniform vec4 opacityParts; <mask> uniform vec4 emissiveLeftColor; <mask> uniform vec4 emissiveRightColor; <mask> <mask> uniform float pointSize; <mask> }; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/ShadersInclude/pbrUboDeclaration.fx
#include<imageProcessingDeclaration>
<mask> #include<reflectionFunction> <mask> <mask> #endif <mask> <mask> #ifdef CAMERACOLORGRADING <mask> #include<colorGradingDefinition> <mask> #include<colorGrading> <mask> #endif <mask> <mask> #ifdef CAMERACOLORCURVES <mask> #include<colorCurvesDefinition> <mask> #include<colorCurves> <mask> #end...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/default.fragment.fx
#include<helperFunctions> #include<imageProcessingFunctions>
<mask> #include<colorGradingDefinition> <mask> #include<colorGrading> <mask> #endif <mask> <mask> #ifdef CAMERACOLORCURVES <mask> #include<colorCurvesDefinition> <mask> #include<colorCurves> <mask> #endif <mask> <mask> #include<bumpFragmentFunctions> <mask> #include<clipPlaneFragmentDeclaration> <mas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/default.fragment.fx
// Apply image processing if relevant. As this applies in linear space, // We first move from gamma to linear. #ifdef IMAGEPROCESSING color.rgb = toLinearSpace(result.rgb); color.rgb = applyImageProcessing(color);
<mask> <mask> #include<logDepthFragment> <mask> #include<fogFragment> <mask> <mask> #ifdef CAMERACOLORGRADING <mask> color = colorGrades(color); <mask> #endif <mask> <mask> #ifdef CAMERACOLORCURVES <mask> color.rgb = applyColorCurves(color.rgb); <mask> #endif </s> image processing to material integrati...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/default.fragment.fx
<mask> #ifdef CAMERACOLORGRADING <mask> color = colorGrades(color); <mask> #endif <mask> <mask> #ifdef CAMERACOLORCURVES <mask> color.rgb = applyColorCurves(color.rgb); <mask> #endif <mask> gl_FragColor = color; <mask> } </s> image processing to material integration Former-commit-id: 6f831aa9b68d14576abe...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/default.fragment.fx
#include<helperFunctions>
<mask> const float GammaEncodePowerApprox = 1.0 / 2.2; <mask> const float LinearEncodePowerApprox = 2.2; <mask> const vec3 RGBLuminanceCoefficients = vec3(0.2126, 0.7152, 0.0722); <mask> <mask> uniform float contrast; <mask> uniform vec4 vignetteSettings1; <mask> uniform vec4 vignetteSettings2; <mask> uniform ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/imageProcessing.fragment.fx
#include<imageProcessingFunctions>
<mask> uniform vec4 vCameraColorCurvePositive; <mask> uniform sampler2D txColorTransform; <mask> uniform vec4 colorTransformSettings; <mask> <mask> vec3 applyEaseInOut(vec3 x){ <mask> return x * x * (3.0 - 2.0 * x); <mask> } <mask> <mask> /** <mask> * Polyfill for SAMPLE_TEXTURE_3D, which is unsupported ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/imageProcessing.fragment.fx
void main(void)
<mask> vec3 applyEaseInOut(vec3 x){ <mask> return x * x * (3.0 - 2.0 * x); <mask> } <mask> <mask> /** <mask> * Polyfill for SAMPLE_TEXTURE_3D, which is unsupported in WebGL. <mask> * colorTransformSettings.y = textureOffset (0.5 / textureSize). <mask> * colorTransformSettings.z = textureSize. <mask> */ ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/imageProcessing.fragment.fx
vec4 result = texture2D(textureSampler, vUV);
<mask> * colorTransformSettings.z = textureSize. <mask> */ <mask> vec3 sampleTexture3D(sampler2D colorTransform, vec3 color) <mask> { <mask> float sliceSize = 2.0 * colorTransformSettings.y; // Size of 1 slice relative to the texture, for example 1/8 <mask> <mask> float sliceContinuous = (color.y - colorTra...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/imageProcessing.fragment.fx
#ifdef IMAGEPROCESSING #ifndef FROMLINEARSPACE // Need to move to linear space for subsequent operations. result.rgb = toLinearSpace(result.rgb);
<mask> <mask> // Interpolate between the artist 'color' and white based on the physical transmission value 'vignette'. <mask> vec3 vignetteColor = vignetteSettings2.rgb; <mask> <mask> #ifdef VIGNETTEBLENDMODEMULTIPLY <mask> vec3 vignetteColorMultiplier = mix(vignetteColor, vec3(1, 1, 1), vignette); <mas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/imageProcessing.fragment.fx
result = applyImageProcessing(result); #else // In case where the input is in linear space we at least need to put it back in gamma. #ifdef FROMLINEARSPACE result = applyImageProcessing(result);
<mask> vec3 vignetteColorMultiplier = mix(vignetteColor, vec3(1, 1, 1), vignette); <mask> result.rgb *= vignetteColorMultiplier; <mask> #endif <mask> <mask> #ifdef VIGNETTEBLENDMODEOPAQUE <mask> result.rgb = mix(vignetteColor, result.rgb, vignette); <mask> #endif <mask> <mask> #endif <mask> <mas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/imageProcessing.fragment.fx
<mask> result.rgb = mix(vignetteColor, result.rgb, vignette); <mask> #endif <mask> <mask> #endif <mask> <mask> #ifdef TONEMAPPING <mask> float tonemappingCalibration = 1.590579; <mask> result.rgb = 1.0 - exp2(-tonemappingCalibration * result.rgb); <mask> #endif <mask> <mask> // Going back to gamma...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/imageProcessing.fragment.fx
<mask> varying vec2 vMicroSurfaceSamplerUV; <mask> uniform sampler2D microSurfaceSampler; <mask> #endif <mask> <mask> // Fresnel <mask> #include<fresnelFunction> <mask> <mask> // Refraction <mask> #ifdef REFRACTION <mask> <mask> <mask> #ifdef REFRACTIONMAP_3D </s> image processing to material integrati...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
#ifdef REFLECTIONMAP_3D uniform samplerCube reflectionCubeSampler; #else uniform sampler2D reflection2DSampler; #endif
<mask> // Reflection <mask> #ifdef REFLECTION <mask> <mask> #ifdef REFLECTIONMAP_SKYBOX <mask> varying vec3 vPositionUVW; <mask> #else <mask> #if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) <mask> varying vec3 vDirectionW; </s> image processing...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
#ifdef REFLECTIONMAP_SKYBOX varying vec3 vPositionUVW; #else #if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) varying vec3 vDirectionW; #endif
<mask> <mask> // Reflection <mask> #ifdef REFLECTION <mask> <mask> #ifdef REFLECTIONMAP_3D <mask> uniform samplerCube reflectionCubeSampler; <mask> #else <mask> uniform sampler2D reflection2DSampler; <mask> #endif <mask> <mask> #ifdef REFLECTIONMAP_SKYBOX <mask> varying vec3 vPositionUVW; <mask> #else ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
#endif
<mask> #else <mask> uniform sampler2D reflection2DSampler; <mask> #endif <mask> <mask> #ifdef REFLECTIONMAP_SKYBOX <mask> varying vec3 vPositionUVW; <mask> #else <mask> #if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) <mask> varying vec3 vDirectionW; <m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
#include<reflectionFunction>
<mask> <mask> #endif <mask> <mask> #endif <mask> <mask> // Forces linear space for image processing <mask> #ifndef FROMLINEARSPACE <mask> #define FROMLINEARSPACE; </s> image processing to material integration Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove #include<reflectionFunct...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
// Forces linear space for image processing #ifndef FROMLINEARSPACE #define FROMLINEARSPACE;
<mask> #endif <mask> <mask> #endif <mask> <mask> #include<reflectionFunction> <mask> <mask> #endif <mask> <mask> #ifdef CAMERACOLORGRADING <mask> #include<colorGradingDefinition> <mask> #endif </s> image processing to material integration Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
#include<imageProcessingDeclaration>
<mask> #include<reflectionFunction> <mask> <mask> #endif <mask> <mask> #ifdef CAMERACOLORGRADING <mask> #include<colorGradingDefinition> <mask> #endif <mask> <mask> #ifdef CAMERACOLORCURVES <mask> #include<colorCurvesDefinition> <mask> #endif <mask> </s> image processing to material integration For...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
#include<helperFunctions> #include<imageProcessingFunctions>
<mask> #ifdef CAMERACOLORGRADING <mask> #include<colorGradingDefinition> <mask> #endif <mask> <mask> #ifdef CAMERACOLORCURVES <mask> #include<colorCurvesDefinition> <mask> #endif <mask> <mask> // PBR <mask> #include<shadowsFragmentFunctions> <mask> #include<pbrFunctions> <mask> </s> image processing t...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
<mask> <mask> // PBR <mask> #include<shadowsFragmentFunctions> <mask> #include<pbrFunctions> <mask> <mask> #ifdef CAMERACOLORGRADING <mask> #include<colorGrading> <mask> #endif <mask> <mask> #ifdef CAMERACOLORCURVES <mask> #include<colorCurves> <mask> #endif <mask> <mask> #include<harmonicsFunctions...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
<mask> <mask> #include<harmonicsFunctions> <mask> #include<pbrLightFunctions> <mask> <mask> #include<helperFunctions> <mask> #include<bumpFragmentFunctions> <mask> #include<clipPlaneFragmentDeclaration> <mask> #include<logDepthDeclaration> <mask> <mask> // Fog </s> image processing to material integration...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
// _______________________________________________________________________________ // _____________________________ Geometry Information ____________________________
<mask> <mask> void main(void) { <mask> #include<clipPlaneFragment> <mask> <mask> vec3 viewDirectionW = normalize(vEyePosition - vPositionW); <mask> <mask> #ifdef NORMAL <mask> vec3 normalW = normalize(vNormalW); <mask> #else </s> image processing to material integration Former-commit-id: 6f831aa9b68d14...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
<mask> #include<clipPlaneFragment> <mask> <mask> vec3 viewDirectionW = normalize(vEyePosition - vPositionW); <mask> <mask> // Bump <mask> #ifdef NORMAL <mask> vec3 normalW = normalize(vNormalW); <mask> #else <mask> vec3 normalW = normalize(cross(dFdx(vPositionW), dFdy(vPositionW))); <mask> #endif </s> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
// _____________________________ Albedo Information ______________________________
<mask> #if defined(TWOSIDEDLIGHTING) && defined(NORMAL) <mask> normalW = gl_FrontFacing ? normalW : -normalW; <mask> #endif <mask> <mask> // Albedo <mask> vec3 surfaceAlbedo = vAlbedoColor.rgb; <mask> <mask> // Alpha <mask> float alpha = vAlbedoColor.a; </s> image processing to material integration ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
// _____________________________ Alpha Information _______________________________ #ifdef OPACITY vec4 opacityMap = texture2D(opacitySampler, vOpacityUV + uvOffset); #ifdef OPACITYRGB alpha = getLuminance(opacityMap.rgb); #else alpha *= opacityMap.a; #endif alpha *= vOpacityInfos.y; #endif #ifd...
<mask> surfaceAlbedo *= toLinearSpace(albedoTexture.rgb); <mask> surfaceAlbedo *= vAlbedoInfos.y; <mask> #endif <mask> <mask> #ifndef LINKREFRACTIONTOTRANSPARENCY <mask> #if defined(ALPHATEST) && defined(ALPHATESTVALUE) <mask> if (alpha <= ALPHATESTVALUE) <mask> discard; <mask> <mask> #ifndef ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
#ifndef ALPHABLEND // Prevent to blend with the canvas. alpha = 1.0; #endif
<mask> #ifndef LINKREFRACTIONTOTRANSPARENCY <mask> #if defined(ALPHATEST) && defined(ALPHATESTVALUE) <mask> if (alpha <= ALPHATESTVALUE) <mask> discard; <mask> <mask> #ifndef ALPHABLEND <mask> // Prevent to blend with the canvas. <mask> alpha = 1.0; <mask> #endif <mask> #endif <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
// _____________________________ AO Information _______________________________
<mask> #ifdef VERTEXCOLOR <mask> surfaceAlbedo *= vColor.rgb; <mask> #endif <mask> <mask> // Ambient color <mask> vec3 ambientOcclusionColor = vec3(1., 1., 1.); <mask> <mask> #ifdef AMBIENT <mask> vec3 ambientOcclusionColorMap = texture2D(ambientSampler, vAmbientUV + uvOffset).rgb * vAmbientInfos.y; <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
// _____________________________ Reflectivity Info _______________________________
<mask> #endif <mask> ambientOcclusionColor = mix(ambientOcclusionColor, ambientOcclusionColorMap, vAmbientInfos.z); <mask> #endif <mask> <mask> // Reflectivity map <mask> float microSurface = vReflectivityColor.a; <mask> vec3 surfaceReflectivityColor = vReflectivityColor.rgb; <mask> <mask> #ifdef METALL...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
<mask> #endif <mask> #endif <mask> #endif <mask> <mask> // Compute N dot V. <mask> float NdotV = clamp(dot(normalW, viewDirectionW),0., 1.) + 0.00001; <mask> <mask> // Adapt microSurface. <mask> microSurface = clamp(microSurface, 0., 1.); <mask> <mask> // Compute roughness. <mask> float roughnes...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
// _____________________________ Alpha Fresnel ___________________________________ #ifdef ALPHAFRESNEL // Convert approximate perceptual opacity (gamma-encoded opacity) to linear opacity (absorptance, or inverse transmission) // for use with the linear HDR render target. The final composition will be converted bac...
<mask> <mask> // Compute roughness. <mask> float roughness = 1. - microSurface; <mask> <mask> #ifdef LIGHTMAP <mask> vec3 lightmapColor = texture2D(lightmapSampler, vLightmapUV + uvOffset).rgb * vLightmapInfos.y; <mask> #endif <mask> <mask> float NdotL = -1.; <mask> <mask> // Compute reflecta...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
vec3 normalForward = faceforward(normalW, -viewDirectionW, normalW);
<mask> #endif <mask> <mask> float NdotL = -1.; <mask> <mask> // Compute reflectance. <mask> float reflectance = max(max(surfaceReflectivityColor.r, surfaceReflectivityColor.g), surfaceReflectivityColor.b); <mask> <mask> // For typical incident reflectance range (between 4% to 100%) set the grazing ref...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
// Calculate the appropriate linear opacity for the current viewing angle (formally, this quantity is the "directional absorptance"). alpha = fresnelSchlickEnvironmentGGX(clamp(dot(V, normalForward), 0.0, 1.0), vec3(opacity0), vec3(opacity90), sqrt(microSurface)).x;
<mask> <mask> // Compute reflectance. <mask> float reflectance = max(max(surfaceReflectivityColor.r, surfaceReflectivityColor.g), surfaceReflectivityColor.b); <mask> <mask> // For typical incident reflectance range (between 4% to 100%) set the grazing reflectance to 100% for typical fresnel effect. <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
#ifdef ALPHATEST if (alpha <= ALPHATESTVALUE) discard;
<mask> #ifdef SPECULARTERM <mask> vec3 specularBase = vec3(0., 0., 0.); <mask> #endif <mask> <mask> lightingInfo info; <mask> float shadow = 1.; // 1 - shadowLevel <mask> <mask> #include<lightFragment>[0..maxSimultaneousLights] <mask> <mask> vec3 lightDiffuseContribution = diffuseBase; <mask> <mask...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
#ifndef ALPHABLEND // Prevent to blend with the canvas. alpha = 1.0; #endif
<mask> <mask> #ifdef OPACITY <mask> vec4 opacityMap = texture2D(opacitySampler, vOpacityUV + uvOffset); <mask> <mask> #ifdef OPACITYRGB <mask> opacityMap.rgb = opacityMap.rgb * vec3(0.3, 0.59, 0.11); <mask> alpha *= (opacityMap.x + opacityMap.y + opacityMap.z)* vOpacityInfos.y; <mask> #else <mask> a...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
// _____________________________ Compute LODs Fetch ____________________________________
<mask> alpha *= opacityMap.a * vOpacityInfos.y; <mask> #endif <mask> #endif <mask> <mask> #ifdef VERTEXALPHA <mask> alpha *= vColor.a; <mask> #endif <mask> <mask> #ifdef OPACITYFRESNEL <mask> float opacityFresnelTerm = computeFresnelTerm(viewDirectionW, normalW, opacityParts.z, opacityParts.w); <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
// _____________________________ Refraction Info _______________________________________
<mask> #endif <mask> <mask> #ifdef REFRACTION <mask> vec3 surfaceRefractionColor = vec3(0., 0., 0.); <mask> vec3 refractionVector = refract(-viewDirectionW, normalW, vRefractionInfos.y); <mask> </s> image processing to material integration Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> rem...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
vec3 surfaceRefractionColor = vec3(0., 0., 0.);
<mask> #endif <mask> <mask> // _____________________________ Refraction Info _______________________________________ <mask> #ifdef REFRACTION <mask> vec3 refractionVector = refract(-viewDirectionW, normalW, vRefractionInfos.y); <mask> <mask> #ifdef LODBASEDMICROSFURACE <mask> #ifdef USEPMREMREFRACTION <m...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
// _____________________________ Reflection Info _______________________________________ #ifdef REFLECTION
<mask> surfaceRefractionColor = toLinearSpace(surfaceRefractionColor.rgb); <mask> #endif <mask> #endif <mask> <mask> // Reflection <mask> vec3 environmentRadiance = vReflectionColor.rgb; <mask> vec3 environmentIrradiance = vReflectionColor.rgb; <mask> <mask> #ifdef REFLECTION <mask> vec3 vReflectionU...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
<mask> <mask> // Reflection <mask> vec3 environmentRadiance = vReflectionColor.rgb; <mask> vec3 environmentIrradiance = vReflectionColor.rgb; <mask> <mask> #ifdef REFLECTION <mask> vec3 vReflectionUVW = computeReflectionCoords(vec4(vPositionW, 1.0), normalW); <mask> <mask> #ifdef LODBASEDMICROSFURACE ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882
src/Shaders/pbr.fragment.fx
if (this._showUI && this._isClickInsideRect(clientRect.left * this._ratio + centerX - 5, clientRect.top * this._ratio + centerY - labelOffset - 12, textMetrics.width + 10, 17)) {
<mask> var centerX = projectedPosition.x - textMetrics.width / 2; <mask> var centerY = projectedPosition.y; <mask> var clientRect = this._drawingCanvas.getBoundingClientRect(); <mask> <mask> if (this._isClickInsideRect(clientRect.left * this._ratio +...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Debug/babylon.debugLayer.ts
this._scene.unregisterBeforeRender(this._syncData);
<mask> this._enabled = false; <mask> <mask> var engine = this._scene.getEngine(); <mask> <mask> this._scene.unregisterAfterRender(this._syncData); <mask> document.body.removeChild(this._globalDiv); <mask> <mask> window.removeEventListener("resize", ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Debug/babylon.debugLayer.ts
this._scene.registerBeforeRender(this._syncData);
<mask> window.addEventListener("resize", this._syncPositions); <mask> engine.getRenderingCanvas().addEventListener("click", this._onCanvasClick); <mask> <mask> this._syncPositions(); <mask> this._scene.registerAfterRender(this._syncData); <mask> } <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Debug/babylon.debugLayer.ts
this.blurSize = 2;
<mask> function ShadowGenerator(mapSize, light) { <mask> var _this = this; <mask> // Members <mask> this.filter = ShadowGenerator.FILTER_NONE; <mask> this._darkness = 0; <mask> this._bias = 0.0001; <mask> this._transparencyShadow = f...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.js
Object.defineProperty(ShadowGenerator, "FILTER_BLURVARIANCESHADOWMAP", { get: function () { return ShadowGenerator._FILTER_BLURVARIANCESHADOWMAP; }, enumerable: true, configurable: true });
<mask> }, <mask> enumerable: true, <mask> configurable: true <mask> }); <mask> Object.defineProperty(ShadowGenerator.prototype, "useVarianceShadowMap", { <mask> get: function () { <mask> return this.filter === ShadowGenerator.FILTER_...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.js
return this.filter === ShadowGenerator.FILTER_POISSONSAMPLING;
<mask> configurable: true <mask> }); <mask> Object.defineProperty(ShadowGenerator.prototype, "usePoissonSampling", { <mask> get: function () { <mask> return this.filter === ShadowGenerator.FILTER_POISSONSAMPLING || (this.filter === ShadowGenerator.FILTER_VARI...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.js
Object.defineProperty(ShadowGenerator.prototype, "useBlurVarianceShadowMap", { get: function () { return this.filter === ShadowGenerator.FILTER_BLURVARIANCESHADOWMAP && this._light.supportsVSM(); }, set: function (value) { this.filter = (value ...
<mask> enumerable: true, <mask> configurable: true <mask> }); <mask> ShadowGenerator.prototype.isReady = function (subMesh, useInstances) { <mask> var defines = []; <mask> if (this.useVarianceShadowMap || this.useBlurVarianceShadowMap) { <mask> ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.js
if (this.useVarianceShadowMap || this.useBlurVarianceShadowMap) {
<mask> configurable: true <mask> }); <mask> ShadowGenerator.prototype.isReady = function (subMesh, useInstances) { <mask> var defines = []; <mask> if (this.useVarianceShadowMap) { <mask> defines.push("#define VSM"); <mask> } <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.js
ShadowGenerator.prototype.getShadowMapForRendering = function () { if (this._shadowMap2) { return this._shadowMap2; } return this._shadowMap; };
<mask> ShadowGenerator.prototype.getShadowMap = function () { <mask> return this._shadowMap; <mask> }; <mask> ShadowGenerator.prototype.getLight = function () { <mask> return this._light; <mask> }; <mask> // Methods <mask> ShadowGenerator.p...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.js
this._light.setShadowProjectionMatrix(this._projectionMatrix, this._viewMatrix, this.getShadowMap().renderList, this.filter === ShadowGenerator.FILTER_VARIANCESHADOWMAP || this.filter === ShadowGenerator.FILTER_BLURVARIANCESHADOWMAP);
<mask> if (this._light.needRefreshPerFrame() || !this._cachedPosition || !this._cachedDirection || !lightPosition.equals(this._cachedPosition) || !lightDirection.equals(this._cachedDirection)) { <mask> this._cachedPosition = lightPosition.clone(); <mask> this._cachedDirect...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.js
if (this._shadowMap2) { this._shadowMap2.dispose(); } if (this._downSamplePostprocess) { this._downSamplePostprocess.dispose(); } if (this._boxBlurPostprocess) { this._boxBlurPostprocess.dispose(); }
<mask> this._transparencyShadow = hasShadow; <mask> }; <mask> ShadowGenerator.prototype.dispose = function () { <mask> this._shadowMap.dispose(); <mask> }; <mask> ShadowGenerator._FILTER_NONE = 0; <mask> ShadowGenerator._FILTER_VARIANCESHADOWMAP = 1...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.js
ShadowGenerator._FILTER_BLURVARIANCESHADOWMAP = 3;
<mask> }; <mask> ShadowGenerator._FILTER_NONE = 0; <mask> ShadowGenerator._FILTER_VARIANCESHADOWMAP = 1; <mask> ShadowGenerator._FILTER_POISSONSAMPLING = 2; <mask> return ShadowGenerator; <mask> })(); <mask> BABYLON.ShadowGenerator = ShadowGenerator; <mask> })(BAB...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.js
private static _FILTER_BLURVARIANCESHADOWMAP = 3;
<mask> private static _FILTER_VARIANCESHADOWMAP = 1; <mask> private static _FILTER_POISSONSAMPLING = 2; <mask> <mask> // Static <mask> public static get FILTER_NONE(): number { <mask> return ShadowGenerator._FILTER_NONE; <mask> } <mask> </s> new BlurVarianc...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
public static get FILTER_BLURVARIANCESHADOWMAP(): number { return ShadowGenerator._FILTER_BLURVARIANCESHADOWMAP; }
<mask> return ShadowGenerator._FILTER_POISSONSAMPLING; <mask> } <mask> <mask> // Members <mask> public filter = ShadowGenerator.FILTER_NONE; <mask> public blurSize = 2; <mask> </s> new BlurVarianceShadowMap filter for shadows Former-commit-id: 51c82cb03994d5a86948...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
public blurSize = 2;
<mask> <mask> // Members <mask> public filter = ShadowGenerator.FILTER_NONE; <mask> <mask> public get useVarianceShadowMap(): boolean { <mask> return this.filter === ShadowGenerator.FILTER_VARIANCESHADOWMAP && this._light.supportsVSM(); <mask> } <mask> publi...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
return this.filter === ShadowGenerator.FILTER_POISSONSAMPLING;
<mask> this.filter = (value ? ShadowGenerator.FILTER_VARIANCESHADOWMAP : ShadowGenerator.FILTER_NONE); <mask> } <mask> <mask> public get usePoissonSampling(): boolean { <mask> return this.filter === ShadowGenerator.FILTER_POISSONSAMPLING || (this.filter === ShadowGenerator....
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
public get useBlurVarianceShadowMap(): boolean { return this.filter === ShadowGenerator.FILTER_BLURVARIANCESHADOWMAP && this._light.supportsVSM(); } public set useBlurVarianceShadowMap(value: boolean) { this.filter = (value ? ShadowGenerator.FILTER_BLURVARIANCESHADOWMAP :...
<mask> this.filter = (value ? ShadowGenerator.FILTER_POISSONSAMPLING : ShadowGenerator.FILTER_NONE); <mask> } <mask> <mask> private _light: IShadowLight; <mask> private _scene: Scene; <mask> private _shadowMap: RenderTargetTexture; <mask> private _shadowMap2: ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
private _shadowMap2: RenderTargetTexture;
<mask> private _light: IShadowLight; <mask> private _scene: Scene; <mask> private _shadowMap: RenderTargetTexture; <mask> private _darkness = 0; <mask> private _bias = 0.0001; <mask> private _transparencyShadow = false; <mask> private _effect: Effect; <mas...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
private _downSamplePostprocess: PassPostProcess; private _boxBlurPostprocess: PostProcess;
<mask> private _cachedDirection: Vector3; <mask> private _cachedDefines: string; <mask> private _currentRenderID: number; <mask> <mask> constructor(mapSize: number, light: IShadowLight) { <mask> this._light = light; <mask> this._scene = light.getScene(); ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
var index: number;
<mask> } <mask> }; <mask> <mask> this._shadowMap.customRenderFunction = (opaqueSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>): void => { <mask> var index; <mask> <mask> f...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
if (this.useVarianceShadowMap || this.useBlurVarianceShadowMap) {
<mask> <mask> public isReady(subMesh: SubMesh, useInstances: boolean): boolean { <mask> var defines = []; <mask> <mask> if (this.useVarianceShadowMap) { <mask> defines.push("#define VSM"); <mask> } <mask> <mask> var attribs = [VertexBuf...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
public getShadowMapForRendering(): RenderTargetTexture { if (this._shadowMap2) { return this._shadowMap2; } return this._shadowMap; }
<mask> return this._shadowMap; <mask> } <mask> <mask> public getLight(): IShadowLight { <mask> return this._light; <mask> } <mask> </s> new BlurVarianceShadowMap filter for shadows Former-commit-id: 51c82cb03994d5a86948873ffe9249010aacaf30 </s> remove ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
this._light.setShadowProjectionMatrix(this._projectionMatrix, this._viewMatrix, this.getShadowMap().renderList, this.filter === ShadowGenerator.FILTER_VARIANCESHADOWMAP || this.filter === ShadowGenerator.FILTER_BLURVARIANCESHADOWMAP);
<mask> this._cachedDirection = lightDirection.clone(); <mask> <mask> Matrix.LookAtLHToRef(lightPosition, this._light.position.add(lightDirection), Vector3.Up(), this._viewMatrix); <mask> <mask> this._light.setShadowProjectionMatrix(this._projectionMatrix, this._vie...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
if (this._shadowMap2) { this._shadowMap2.dispose(); } if (this._downSamplePostprocess) { this._downSamplePostprocess.dispose(); } if (this._boxBlurPostprocess) { this._boxBlurPostprocess.dispose(); ...
<mask> } <mask> <mask> public dispose(): void { <mask> this._shadowMap.dispose(); <mask> } <mask> } <mask> } </s> new BlurVarianceShadowMap filter for shadows Former-commit-id: 51c82cb03994d5a86948873ffe9249010aacaf30 </s> remove public _finalizeFrame(doNotPres...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/Shadows/babylon.shadowGenerator.ts
this.shadowOrthoScale = 1.1; this.shadowOrthoDepthScale = 3;
<mask> _super.call(this, name, scene); <mask> this.direction = direction; <mask> this.position = direction.scale(-1); <mask> } <mask> DirectionalLight.prototype.getAbsolutePosition = function () { <mask> return this.transformedPosition ? this.transfo...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.js
DirectionalLight.prototype.setShadowProjectionMatrix = function (matrix, viewMatrix, renderList, useVSM) {
<mask> DirectionalLight.prototype.setDirectionToTarget = function (target) { <mask> this.direction = BABYLON.Vector3.Normalize(target.subtract(this.position)); <mask> return this.direction; <mask> }; <mask> DirectionalLight.prototype.setShadowProjectionMatrix = funct...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.js
var orthoNear = Number.MAX_VALUE; var orthoFar = Number.MIN_VALUE;
<mask> var orthoTop = Number.MIN_VALUE; <mask> var orthoBottom = Number.MAX_VALUE; <mask> var tempVector3 = BABYLON.Vector3.Zero(); <mask> var activeCamera = this.getScene().activeCamera; <mask> for (var meshIndex = 0; meshIndex < renderList.length; meshI...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.js
if (tempVector3.z < orthoNear) orthoNear = tempVector3.z; if (tempVector3.z > orthoFar) orthoFar = tempVector3.z;
<mask> if (tempVector3.x > orthoRight) <mask> orthoRight = tempVector3.x; <mask> if (tempVector3.y > orthoTop) <mask> orthoTop = tempVector3.y; <mask> } <mask> } <mask> var orthoWidth =...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.js
var orthoWidth = Math.max(Math.abs(orthoRight), Math.abs(orthoLeft)) * this.shadowOrthoScale; var orthoHeight = Math.max(Math.abs(orthoTop), Math.abs(orthoBottom)) * this.shadowOrthoScale; var orthoDepth = Math.max(Math.abs(orthoNear), Math.abs(orthoFar)) * this.shadowOrthoDepthScale...
<mask> if (tempVector3.y > orthoTop) <mask> orthoTop = tempVector3.y; <mask> } <mask> } <mask> var orthoWidth = Math.max(Math.abs(orthoRight), Math.abs(orthoLeft)) * 1.1; <mask> var orthoHeight = Math.max(Math.abs(orth...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.js
return true;
<mask> var orthoHeight = Math.max(Math.abs(orthoTop), Math.abs(orthoBottom)) * 1.1; <mask> BABYLON.Matrix.OrthoOffCenterLHToRef(-orthoWidth, orthoWidth, -orthoHeight, orthoHeight, activeCamera.minZ, activeCamera.maxZ, matrix); <mask> }; <mask> DirectionalLight.prototype.suppo...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.js
public shadowOrthoScale = 1.1; public shadowOrthoDepthScale = 3;
<mask> private _transformedDirection: Vector3; <mask> public transformedPosition: Vector3; <mask> private _worldMatrix: Matrix; <mask> <mask> constructor(name: string, public direction: Vector3, scene: Scene) { <mask> super(name, scene); <mask> <mask> th...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.ts
public setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>, useVSM: boolean): void {
<mask> this.direction = Vector3.Normalize(target.subtract(this.position)); <mask> return this.direction; <mask> } <mask> <mask> public setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void { <mask> var orthoLeft = ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.ts
var orthoNear = Number.MAX_VALUE; var orthoFar = Number.MIN_VALUE;
<mask> var orthoRight = Number.MIN_VALUE; <mask> var orthoTop = Number.MIN_VALUE; <mask> var orthoBottom = Number.MAX_VALUE; <mask> <mask> var tempVector3 = Vector3.Zero(); <mask> <mask> var activeCamera = this.getScene().activeCamera; </s> new BlurV...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.ts
if (tempVector3.z < orthoNear) orthoNear = tempVector3.z; if (tempVector3.z > orthoFar) orthoFar = tempVector3.z;
<mask> orthoRight = tempVector3.x; <mask> if (tempVector3.y > orthoTop) <mask> orthoTop = tempVector3.y; <mask> } <mask> } <mask> <mask> var orthoWidth = Math.max(Math.abs(orthoRight), Math.abs(orthoLeft)...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.ts
var orthoWidth = Math.max(Math.abs(orthoRight), Math.abs(orthoLeft)) * this.shadowOrthoScale; var orthoHeight = Math.max(Math.abs(orthoTop), Math.abs(orthoBottom)) * this.shadowOrthoScale; var orthoDepth = Math.max(Math.abs(orthoNear), Math.abs(orthoFar)) * this.shadowOrthoDepthScale...
<mask> orthoTop = tempVector3.y; <mask> } <mask> } <mask> <mask> var orthoWidth = Math.max(Math.abs(orthoRight), Math.abs(orthoLeft)) * 1.1; <mask> var orthoHeight = Math.max(Math.abs(orthoTop), Math.abs(orthoBottom)) * 1.1; <mask> <m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.ts
public getVSMOffset(): number { return 0.55;
<mask> <mask> var orthoWidth = Math.max(Math.abs(orthoRight), Math.abs(orthoLeft)) * 1.1; <mask> var orthoHeight = Math.max(Math.abs(orthoTop), Math.abs(orthoBottom)) * 1.1; <mask> <mask> Matrix.OrthoOffCenterLHToRef(-orthoWidth, orthoWidth, -orthoHeight, orthoHeight, activeCa...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.ts
return true;
<mask> Matrix.OrthoOffCenterLHToRef(-orthoWidth, orthoWidth, -orthoHeight, orthoHeight, activeCamera.minZ, activeCamera.maxZ, matrix); <mask> } <mask> <mask> public supportsVSM(): boolean { <mask> return false; <mask> } <mask> <mask> public needRefreshPe...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.directionalLight.ts
setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>, useVSM: boolean): void;
<mask> <mask> computeTransformedPosition(): boolean; <mask> getScene(): Scene; <mask> <mask> setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void; <mask> <mask> supportsVSM(): boolean; <mask> <mask> needRefreshPerFrame(...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.light.ts
getVSMOffset(): number;
<mask> getScene(): Scene; <mask> <mask> setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>, useVSM: boolean): void; <mask> <mask> supportsVSM(): boolean; <mask> needRefreshPerFrame(): boolean; <mask> <mask> _shadowGenerator: S...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.light.ts
SpotLight.prototype.setShadowProjectionMatrix = function (matrix, viewMatrix, renderList, useVSM) {
<mask> } <mask> SpotLight.prototype.getAbsolutePosition = function () { <mask> return this.transformedPosition ? this.transformedPosition : this.position; <mask> }; <mask> SpotLight.prototype.setShadowProjectionMatrix = function (matrix, viewMatrix, renderList) { <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.spotLight.js
SpotLight.prototype.getVSMOffset = function () { return 0.2; };
<mask> SpotLight.prototype.setShadowProjectionMatrix = function (matrix, viewMatrix, renderList, useVSM) { <mask> var activeCamera = this.getScene().activeCamera; <mask> BABYLON.Matrix.PerspectiveFovLHToRef(this.angle, 1.0, activeCamera.minZ, activeCamera.maxZ, matrix); <mask> ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.spotLight.js
public setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>, useVSM: boolean): void {
<mask> public getAbsolutePosition(): Vector3 { <mask> return this.transformedPosition ? this.transformedPosition : this.position; <mask> } <mask> <mask> public setShadowProjectionMatrix(matrix: Matrix, viewMatrix: Matrix, renderList: Array<AbstractMesh>): void { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.spotLight.ts
public getVSMOffset(): number { return 0.2; }
<mask> Matrix.PerspectiveFovLHToRef(this.angle, 1.0, activeCamera.minZ, activeCamera.maxZ, matrix); <mask> } <mask> <mask> public supportsVSM(): boolean { <mask> return true; <mask> } <mask> <mask> public needRefreshPerFrame(): boolean { </s> new BlurVa...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Lights/babylon.spotLight.ts
if (this.onAfterUnbind) { this.onAfterUnbind(); }
<mask> } <mask> // Unbind <mask> engine.unBindFramebuffer(this._texture); <mask> }; <mask> RenderTargetTexture.prototype.clone = function () { <mask> var textureSize = this.getSize(); <mask> var newTexture = new RenderTargetTexture(this....
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/f5363ce348e7a18e22435850b2a8e783ebc01fdb
Babylon/Materials/Textures/babylon.renderTargetTexture.js