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 |
|---|---|---|---|---|
transform: scale(1);
| <mask> position: absolute;
<mask> right: 0px;
<mask> top:0px;
<mask> bottom: 0px;
<mask> }
<mask>
<mask> #__resizable_base__ {
<mask> display: none;
</s> Fix inspector css
Former-commit-id: bef6cba1322e25a57f23164834c6eec6b39f8887 | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f2ffe166fc5b3ecc93c80729c623f1339cf8420f | inspector/src/components/actionTabs/actionTabs.scss |
transform: scale(1);
z-index: 10;
| <mask> right: 0px;
<mask> top:0px;
<mask> bottom: 0px;
<mask> }
<mask>
<mask> #__resizable_base__ {
<mask> display: none;
</s> Fix inspector css
Former-commit-id: bef6cba1322e25a57f23164834c6eec6b39f8887 | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f2ffe166fc5b3ecc93c80729c623f1339cf8420f | inspector/src/components/embedHost/embedHost.scss |
transform: scale(1);
| <mask> left: 0px;
<mask> top:0px;
<mask> bottom: 0px;
<mask>
<mask> &:focus {
<mask> outline: none;
<mask> }
<mask> }
<mask>
</s> Fix inspector css
Former-commit-id: bef6cba1322e25a57f23164834c6eec6b39f8887 | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f2ffe166fc5b3ecc93c80729c623f1339cf8420f | inspector/src/components/sceneExplorer/sceneExplorer.scss |
<mask> return FollowCamera;
<mask> })(BABYLON.TargetCamera);
<mask> BABYLON.FollowCamera = FollowCamera;
<mask> })(BABYLON || (BABYLON = {}));
<mask> //# sourceMappingURL=babylon.followCamera.js.map </s> Angles should be specified in radians
Former-commit-id: c9bfab7b85b08a648b71b70af6db129f47417f7a </s> remove this._cartesianCoordinates.x = this.radius * Math.cos(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
this._cartesianCoordinates.y = this.radius * Math.sin(this._degToRad(this.beta));
this._cartesianCoordinates.z = this.radius * Math.sin(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
</s> add this._cartesianCoordinates.x = this.radius * Math.cos(this.alpha) * Math.cos(this.beta);
this._cartesianCoordinates.y = this.radius * Math.sin(this.beta);
this._cartesianCoordinates.z = this.radius * Math.sin(this.alpha) * Math.cos(this.beta); </s> remove private _degToRad(deg) {
return deg * this._radPerDeg;
}
</s> add </s> remove private _radPerDeg:number = Math.PI / 180;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace"
] | https://github.com/BabylonJS/Babylon.js/commit/f31d5f96584d4e15a856e854b4d24e85cf4501f1 | src/Cameras/babylon.followCamera.js | |
<mask> }
<mask>
<mask> export class ArcFollowCamera extends TargetCamera {
<mask>
<mask> private _radPerDeg:number = Math.PI / 180;
<mask> private _cartesianCoordinates:Vector3 = Vector3.Zero();
<mask>
<mask> constructor(name:string, public alpha:number, public beta:number, public radius:number, public target:AbstractMesh, scene:Scene) {
<mask> super(name, Vector3.Zero(), scene);
<mask> this.follow();
</s> Angles should be specified in radians
Former-commit-id: c9bfab7b85b08a648b71b70af6db129f47417f7a </s> remove private _degToRad(deg) {
return deg * this._radPerDeg;
}
</s> add </s> remove this._cartesianCoordinates.x = this.radius * Math.cos(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
this._cartesianCoordinates.y = this.radius * Math.sin(this._degToRad(this.beta));
this._cartesianCoordinates.z = this.radius * Math.sin(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
</s> add this._cartesianCoordinates.x = this.radius * Math.cos(this.alpha) * Math.cos(this.beta);
this._cartesianCoordinates.y = this.radius * Math.sin(this.beta);
this._cartesianCoordinates.z = this.radius * Math.sin(this.alpha) * Math.cos(this.beta); </s> remove //# sourceMappingURL=babylon.followCamera.js.map </s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f31d5f96584d4e15a856e854b4d24e85cf4501f1 | src/Cameras/babylon.followCamera.ts | |
<mask> super(name, Vector3.Zero(), scene);
<mask> this.follow();
<mask> }
<mask>
<mask> private _degToRad(deg) {
<mask> return deg * this._radPerDeg;
<mask> }
<mask>
<mask> private follow():void {
<mask> this._cartesianCoordinates.x = this.radius * Math.cos(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
<mask> this._cartesianCoordinates.y = this.radius * Math.sin(this._degToRad(this.beta));
<mask> this._cartesianCoordinates.z = this.radius * Math.sin(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
<mask>
</s> Angles should be specified in radians
Former-commit-id: c9bfab7b85b08a648b71b70af6db129f47417f7a </s> remove this._cartesianCoordinates.x = this.radius * Math.cos(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
this._cartesianCoordinates.y = this.radius * Math.sin(this._degToRad(this.beta));
this._cartesianCoordinates.z = this.radius * Math.sin(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
</s> add this._cartesianCoordinates.x = this.radius * Math.cos(this.alpha) * Math.cos(this.beta);
this._cartesianCoordinates.y = this.radius * Math.sin(this.beta);
this._cartesianCoordinates.z = this.radius * Math.sin(this.alpha) * Math.cos(this.beta); </s> remove private _radPerDeg:number = Math.PI / 180;
</s> add </s> remove //# sourceMappingURL=babylon.followCamera.js.map </s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f31d5f96584d4e15a856e854b4d24e85cf4501f1 | src/Cameras/babylon.followCamera.ts | |
this._cartesianCoordinates.x = this.radius * Math.cos(this.alpha) * Math.cos(this.beta);
this._cartesianCoordinates.y = this.radius * Math.sin(this.beta);
this._cartesianCoordinates.z = this.radius * Math.sin(this.alpha) * Math.cos(this.beta); | <mask> return deg * this._radPerDeg;
<mask> }
<mask>
<mask> private follow():void {
<mask> this._cartesianCoordinates.x = this.radius * Math.cos(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
<mask> this._cartesianCoordinates.y = this.radius * Math.sin(this._degToRad(this.beta));
<mask> this._cartesianCoordinates.z = this.radius * Math.sin(this._degToRad(this.alpha)) * Math.cos(this._degToRad(this.beta));
<mask>
<mask> this.position = this.target.position.add(this._cartesianCoordinates);
<mask> this.setTarget(this.target.position);
<mask> }
<mask>
</s> Angles should be specified in radians
Former-commit-id: c9bfab7b85b08a648b71b70af6db129f47417f7a </s> remove private _degToRad(deg) {
return deg * this._radPerDeg;
}
</s> add </s> remove private _radPerDeg:number = Math.PI / 180;
</s> add </s> remove //# sourceMappingURL=babylon.followCamera.js.map </s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f31d5f96584d4e15a856e854b4d24e85cf4501f1 | src/Cameras/babylon.followCamera.ts |
"debug", "textureTools", "hdr",
"loader" | <mask> "shadows", "pointLight", "directionalLight", "spotLight",
<mask> "multiMaterial", "pbrMaterial",
<mask> "meshBuilder", "layer",
<mask> "additionalPostProcess_blur", "additionalPostProcess_fxaa", "additionalPostProcess_highlights", "additionalPostProcess_imageProcessing", "colorCurves", "defaultRenderingPipeline",
<mask> "debug", "textureTools"
<mask> ],
<mask> "distributed": ["minimalViewer"]
<mask> },
<mask> "workloads" :
<mask> {
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove "../../materialsLibrary/src/legacyPBR/legacyPbrVertexDeclaration.fx"
</s> add "../../materialsLibrary/src/legacyPBR/legacyPbrVertexDeclaration.fx",
"../../materialsLibrary/src/legacyPBR/legacyColorCurves.fx",
"../../materialsLibrary/src/legacyPBR/legacyColorCurvesDefinition.fx",
"../../materialsLibrary/src/legacyPBR/legacyColorGrading.fx",
"../../materialsLibrary/src/legacyPBR/legacyColorGradingDefinition.fx", </s> remove private static _scaledEmissive = new Color3();
private static _scaledReflection = new Color3();
public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, useScalarInLinearSpace: boolean, maxSimultaneousLights: number, usePhysicalLightFalloff: boolean) {
var lightIndex = 0;
for (var light of mesh._lightSources) {
let useUbo = light._uniformBuffer.useUbo;
let scaledIntensity = light.getScaledIntensity();
light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
MaterialHelper.BindLightProperties(light, effect, lightIndex);
// GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(light.diffuse, PBRMaterial._scaledAlbedo, useScalarInLinearSpace);
PBRMaterial._scaledAlbedo.scaleToRef(scaledIntensity, PBRMaterial._scaledAlbedo);
light._uniformBuffer.updateColor4(useUbo ? "vLightDiffuse" : "vLightDiffuse" + lightIndex, PBRMaterial._scaledAlbedo, usePhysicalLightFalloff ? light.radius : light.range);
if (defines["SPECULARTERM"]) {
this.convertColorToLinearSpaceToRef(light.specular, PBRMaterial._scaledReflectivity, useScalarInLinearSpace);
PBRMaterial._scaledReflectivity.scaleToRef(scaledIntensity, PBRMaterial._scaledReflectivity);
light._uniformBuffer.updateColor3(useUbo ? "vLightSpecular" : "vLightSpecular" + lightIndex, PBRMaterial._scaledReflectivity);
}
// Shadows
if (scene.shadowsEnabled) {
MaterialHelper.BindLightShadow(light, scene, mesh, lightIndex + "", effect);
}
light._uniformBuffer.update();
lightIndex++;
if (lightIndex === maxSimultaneousLights)
break;
}
}
</s> add </s> remove super(name, "imageProcessing", [
'contrast',
'vignetteSettings1',
'vignetteSettings2',
'cameraExposureLinear',
'vCameraColorCurveNegative',
'vCameraColorCurveNeutral',
'vCameraColorCurvePositive',
'colorTransformSettings'
], ["txColorTransform"], options, camera, samplingMode, engine, reusable,
</s> add super(name, "imageProcessing", [], [], options, camera, samplingMode, engine, reusable,
</s> remove // GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(this._reflectivityColor, PBRMaterial._scaledReflectivity);
this._uniformBuffer.updateColor4("vReflectivityColor", PBRMaterial._scaledReflectivity, this._microSurface);
</s> add this._uniformBuffer.updateColor4("vReflectivityColor", this._reflectivityColor, this._microSurface);
</s> remove light.diffuse.scaleToRef(light.intensity, Tmp.Color3[0]);
light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], light.range, lightIndex + "");
</s> add light.diffuse.scaleToRef(scaledIntensity, Tmp.Color3[0]);
light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], usePhysicalLightFalloff ? light.radius : light.range, lightIndex + "");
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | Tools/Gulp/config.json |
"../../materialsLibrary/src/legacyPBR/legacyPbrVertexDeclaration.fx",
"../../materialsLibrary/src/legacyPBR/legacyColorCurves.fx",
"../../materialsLibrary/src/legacyPBR/legacyColorCurvesDefinition.fx",
"../../materialsLibrary/src/legacyPBR/legacyColorGrading.fx",
"../../materialsLibrary/src/legacyPBR/legacyColorGradingDefinition.fx", | <mask> "../../materialsLibrary/src/legacyPBR/legacyPbrFunctions.fx",
<mask> "../../materialsLibrary/src/legacyPBR/legacyPbrLightFunctions.fx",
<mask> "../../materialsLibrary/src/legacyPBR/legacyPbrLightFunctionsCall.fx",
<mask> "../../materialsLibrary/src/legacyPBR/legacyPbrUboDeclaration.fx",
<mask> "../../materialsLibrary/src/legacyPBR/legacyPbrVertexDeclaration.fx"
<mask> ],
<mask> "output": "babylon.legacyPbrMaterial.js"
<mask> }
<mask> ],
<mask> "build": {
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove "debug", "textureTools"
</s> add "debug", "textureTools", "hdr",
"loader" </s> remove super(name, "imageProcessing", [
'contrast',
'vignetteSettings1',
'vignetteSettings2',
'cameraExposureLinear',
'vCameraColorCurveNegative',
'vCameraColorCurveNeutral',
'vCameraColorCurvePositive',
'colorTransformSettings'
], ["txColorTransform"], options, camera, samplingMode, engine, reusable,
</s> add super(name, "imageProcessing", [], [], options, camera, samplingMode, engine, reusable,
</s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
</s> remove if (defines.OPACITYFRESNEL) {
fallbacks.addFallback(1, "OPACITYFRESNEL");
}
if (defines.EMISSIVEFRESNEL) {
fallbacks.addFallback(2, "EMISSIVEFRESNEL");
}
if (defines.FRESNEL) {
fallbacks.addFallback(3, "FRESNEL");
}
</s> add </s> remove
if (this._cameraColorGradingTexture) {
this._cameraColorGradingTexture.dispose();
}
</s> add }
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | Tools/Gulp/config.json |
#include<legacyColorGradingDefinition>
| <mask>
<mask> #endif
<mask>
<mask> #ifdef CAMERACOLORGRADING
<mask> #include<colorGradingDefinition>
<mask> #endif
<mask>
<mask> #ifdef CAMERACOLORCURVES
<mask> #include<colorCurvesDefinition>
<mask> #endif
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove #ifdef CAMERACOLORGRADING
#include<colorGradingDefinition>
#endif
</s> add #include<imageProcessingDeclaration>
</s> remove #ifdef CAMERACOLORGRADING
#include<colorGradingDefinition>
#include<colorGrading>
#endif
</s> add #include<imageProcessingDeclaration>
</s> remove #ifdef CAMERACOLORCURVES
#include<colorCurvesDefinition>
#endif
</s> add #include<helperFunctions>
#include<imageProcessingFunctions>
</s> remove #include<colorCurvesDefinition>
</s> add #include<legacyColorCurvesDefinition>
</s> remove #ifdef CAMERACOLORCURVES
#include<colorCurvesDefinition>
#include<colorCurves>
#endif
</s> add #include<helperFunctions>
#include<imageProcessingFunctions>
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | materialsLibrary/src/legacyPBR/legacyPbr.fragment.fx |
#include<legacyColorCurvesDefinition>
| <mask> #include<colorGradingDefinition>
<mask> #endif
<mask>
<mask> #ifdef CAMERACOLORCURVES
<mask> #include<colorCurvesDefinition>
<mask> #endif
<mask>
<mask> // PBR
<mask> #include<shadowsFragmentFunctions>
<mask> #include<legacyPbrFunctions>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove #ifdef CAMERACOLORCURVES
#include<colorCurvesDefinition>
#endif
</s> add #include<helperFunctions>
#include<imageProcessingFunctions>
</s> remove #include<colorGrading>
</s> add #include<legacyColorGrading>
</s> remove #include<colorGradingDefinition>
</s> add #include<legacyColorGradingDefinition>
</s> remove #ifdef CAMERACOLORGRADING
#include<colorGradingDefinition>
#endif
</s> add #include<imageProcessingDeclaration>
</s> remove #ifdef CAMERACOLORGRADING
#include<colorGradingDefinition>
#include<colorGrading>
#endif
</s> add #include<imageProcessingDeclaration>
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | materialsLibrary/src/legacyPBR/legacyPbr.fragment.fx |
#include<legacyColorGrading>
| <mask> #include<shadowsFragmentFunctions>
<mask> #include<legacyPbrFunctions>
<mask>
<mask> #ifdef CAMERACOLORGRADING
<mask> #include<colorGrading>
<mask> #endif
<mask>
<mask> #ifdef CAMERACOLORCURVES
<mask> #include<colorCurves>
<mask> #endif
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
#ifdef CAMERACOLORGRADING
#include<colorGrading>
#endif
#ifdef CAMERACOLORCURVES
#include<colorCurves>
#endif
</s> add </s> remove #ifdef CAMERACOLORGRADING
#include<colorGradingDefinition>
#include<colorGrading>
#endif
</s> add #include<imageProcessingDeclaration>
</s> remove #include<colorCurvesDefinition>
</s> add #include<legacyColorCurvesDefinition>
</s> remove #include<colorCurves>
</s> add #include<legacyColorCurves>
</s> remove #ifdef CAMERACOLORCURVES
#include<colorCurvesDefinition>
#include<colorCurves>
#endif
</s> add #include<helperFunctions>
#include<imageProcessingFunctions>
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | materialsLibrary/src/legacyPBR/legacyPbr.fragment.fx |
#include<legacyColorCurves>
| <mask> #include<colorGrading>
<mask> #endif
<mask>
<mask> #ifdef CAMERACOLORCURVES
<mask> #include<colorCurves>
<mask> #endif
<mask>
<mask> #include<harmonicsFunctions>
<mask> #include<legacyPbrLightFunctions>
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
#ifdef CAMERACOLORGRADING
#include<colorGrading>
#endif
#ifdef CAMERACOLORCURVES
#include<colorCurves>
#endif
</s> add </s> remove #include<colorGrading>
</s> add #include<legacyColorGrading>
</s> remove #ifdef CAMERACOLORGRADING
#include<colorGradingDefinition>
#include<colorGrading>
#endif
</s> add #include<imageProcessingDeclaration>
</s> remove #ifdef CAMERACOLORCURVES
#include<colorCurvesDefinition>
#include<colorCurves>
#endif
</s> add #include<helperFunctions>
#include<imageProcessingFunctions>
</s> remove #include<colorGradingDefinition>
</s> add #include<legacyColorGradingDefinition>
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | materialsLibrary/src/legacyPBR/legacyPbr.fragment.fx |
mat3 transposeMat3(mat3 inMatrix) {
vec3 i0 = inMatrix[0];
vec3 i1 = inMatrix[1];
vec3 i2 = inMatrix[2];
mat3 outMatrix = mat3(
vec3(i0.x, i1.x, i2.x),
vec3(i0.y, i1.y, i2.y),
vec3(i0.z, i1.z, i2.z)
);
return outMatrix;
}
| <mask>
<mask> #include<harmonicsFunctions>
<mask> #include<legacyPbrLightFunctions>
<mask>
<mask> #include<helperFunctions>
<mask> #include<bumpFragmentFunctions>
<mask> #include<clipPlaneFragmentDeclaration>
<mask> #include<logDepthDeclaration>
<mask>
<mask> // Fog
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove #include<helperFunctions>
</s> add </s> remove #ifdef CAMERACOLORCURVES
#include<colorCurvesDefinition>
#include<colorCurves>
#endif
</s> add #include<helperFunctions>
#include<imageProcessingFunctions>
</s> remove
#ifdef CAMERACOLORGRADING
#include<colorGrading>
#endif
#ifdef CAMERACOLORCURVES
#include<colorCurves>
#endif
</s> add </s> remove #include<colorCurves>
</s> add #include<legacyColorCurves>
</s> remove #ifdef CAMERACOLORCURVES
#include<colorCurvesDefinition>
#endif
</s> add #include<helperFunctions>
#include<imageProcessingFunctions>
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | materialsLibrary/src/legacyPBR/legacyPbr.fragment.fx |
<mask> public ALPHAFROMALBEDO = false;
<mask> public POINTSIZE = false;
<mask> public FOG = false;
<mask> public SPECULARTERM = false;
<mask> public OPACITYFRESNEL = false;
<mask> public EMISSIVEFRESNEL = false;
<mask> public FRESNEL = false;
<mask> public NORMAL = false;
<mask> public TANGENT = false;
<mask> public UV1 = false;
<mask> public UV2 = false;
<mask> public VERTEXCOLOR = false;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public CAMERATONEMAP = false;
public CAMERACONTRAST = false;
public CAMERACOLORGRADING = false;
public CAMERACOLORCURVES = false;
</s> add </s> remove public CAMERACOLORGRADING = false;
public CAMERACOLORCURVES = false;
</s> add </s> remove public EMISSIVEASILLUMINATION = false;
</s> add </s> remove public LDROUTPUT = true;
</s> add public PREMULTIPLYALPHA = false;
public ALPHAFRESNEL = false;
public IMAGEPROCESSING = false;
public VIGNETTE = false;
public VIGNETTEBLENDMODEMULTIPLY = false;
public VIGNETTEBLENDMODEOPAQUE = false;
public TONEMAPPING = false;
public CONTRAST = false;
public COLORCURVES = false;
public COLORGRADING = false;
public HDRLINEAROUTPUT = false;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
<mask> public BonesPerMesh = 0;
<mask> public INSTANCES = false;
<mask> public MICROSURFACEFROMREFLECTIVITYMAP = false;
<mask> public MICROSURFACEAUTOMATIC = false;
<mask> public EMISSIVEASILLUMINATION = false;
<mask> public LIGHTMAP = false;
<mask> public USELIGHTMAPASSHADOWMAP = false;
<mask> public REFLECTIONMAP_3D = false;
<mask> public REFLECTIONMAP_SPHERICAL = false;
<mask> public REFLECTIONMAP_PLANAR = false;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public CAMERACOLORGRADING = false;
public CAMERACOLORCURVES = false;
</s> add </s> remove public LDROUTPUT = true;
</s> add public PREMULTIPLYALPHA = false;
public ALPHAFRESNEL = false;
public IMAGEPROCESSING = false;
public VIGNETTE = false;
public VIGNETTEBLENDMODEMULTIPLY = false;
public VIGNETTEBLENDMODEOPAQUE = false;
public TONEMAPPING = false;
public CONTRAST = false;
public COLORCURVES = false;
public COLORGRADING = false;
public HDRLINEAROUTPUT = false;
</s> remove public CAMERATONEMAP = false;
public CAMERACONTRAST = false;
public CAMERACOLORGRADING = false;
public CAMERACOLORCURVES = false;
</s> add </s> remove public OPACITYFRESNEL = false;
public EMISSIVEFRESNEL = false;
public FRESNEL = false;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
<mask> public REFLECTIONMAP_EQUIRECTANGULAR_FIXED = false;
<mask> public REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = false;
<mask> public INVERTCUBICMAP = false;
<mask> public LOGARITHMICDEPTH = false;
<mask> public CAMERATONEMAP = false;
<mask> public CAMERACONTRAST = false;
<mask> public CAMERACOLORGRADING = false;
<mask> public CAMERACOLORCURVES = false;
<mask> public USESPHERICALFROMREFLECTIONMAP = false;
<mask> public REFRACTION = false;
<mask> public REFRACTIONMAP_3D = false;
<mask> public LINKREFRACTIONTOTRANSPARENCY = false;
<mask> public REFRACTIONMAPINLINEARSPACE = false;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public CAMERACOLORGRADING = false;
public CAMERACOLORCURVES = false;
</s> add </s> remove public OPACITYFRESNEL = false;
public EMISSIVEFRESNEL = false;
public FRESNEL = false;
</s> add </s> remove public EMISSIVEASILLUMINATION = false;
</s> add </s> remove public LDROUTPUT = true;
</s> add public PREMULTIPLYALPHA = false;
public ALPHAFRESNEL = false;
public IMAGEPROCESSING = false;
public VIGNETTE = false;
public VIGNETTEBLENDMODEMULTIPLY = false;
public VIGNETTEBLENDMODEOPAQUE = false;
public TONEMAPPING = false;
public CONTRAST = false;
public COLORCURVES = false;
public COLORGRADING = false;
public HDRLINEAROUTPUT = false;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
public PREMULTIPLYALPHA = false;
public ALPHAFRESNEL = false;
public IMAGEPROCESSING = false;
public VIGNETTE = false;
public VIGNETTEBLENDMODEMULTIPLY = false;
public VIGNETTEBLENDMODEOPAQUE = false;
public TONEMAPPING = false;
public CONTRAST = false;
public COLORCURVES = false;
public COLORGRADING = false;
public HDRLINEAROUTPUT = false;
| <mask> public MORPHTARGETS_TANGENT = false;
<mask> public NUM_MORPH_INFLUENCERS = 0;
<mask>
<mask> public ALPHATESTVALUE = 0.5;
<mask> public LDROUTPUT = true;
<mask>
<mask> constructor() {
<mask> super();
<mask> this.rebuild();
<mask> }
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public CAMERACOLORGRADING = false;
public CAMERACOLORCURVES = false;
</s> add </s> remove public vignetteStretch = 0;
public vignetteCentreX = 0;
public vignetteCentreY = 0;
public vignetteWeight = 1.5;
public vignetteColor: BABYLON.Color4 = new BABYLON.Color4(0, 0, 0, 0);
private _vignetteBlendMode = ImageProcessingPostProcess.VIGNETTEMODE_MULTIPLY;
private _vignetteEnabled = true;
public cameraContrast = 1.0;
public cameraExposure = 1.68;
private _cameraToneMappingEnabled = true;
private _fromLinearSpace = false;
</s> add /**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
</s> remove public cameraFov = 0.5;
</s> add /**
* Default configuration related to image processing available in the PBR Material.
*/
protected _imageProcessingConfiguration: ImageProcessing;
</s> remove public EMISSIVEASILLUMINATION = false;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
<mask> * Debug Control allowing disabling the bump map on this material.
<mask> */
<mask> protected _disableBumpMap: boolean = false;
<mask>
<mask> /**
<mask> * The camera exposure used on this material.
<mask> * This property is here and not in the camera to allow controlling exposure without full screen post process.
<mask> * This corresponds to a photographic exposure.
<mask> */
<mask> protected _cameraExposure: number = 1.0;
<mask>
<mask> /**
<mask> * The camera contrast used on this material.
<mask> * This property is here and not in the camera to allow controlling contrast without full screen post process.
<mask> */
<mask> protected _cameraContrast: number = 1.0;
<mask>
<mask> /**
<mask> * Color Grading 2D Lookup Texture.
<mask> * This allows special effects like sepia, black and white to sixties rendering style.
<mask> */
<mask> protected _cameraColorGradingTexture: BaseTexture = null;
<mask>
<mask> /**
<mask> * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
<mask> * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
<mask> * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
<mask> * corresponding to low luminance, medium luminance, and high luminance areas respectively.
<mask> */
<mask> protected _cameraColorCurves: ColorCurves = null;
<mask>
<mask> private _cameraInfos: Vector4 = new Vector4(1.0, 1.0, 0.0, 0.0);
<mask>
<mask> private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
<mask>
<mask> /**
<mask> * AKA Diffuse Texture in standard nomenclature.
<mask> */
<mask> protected _albedoTexture: BaseTexture;
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
@serializeAsTexture()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
@serializeAsColorCurves()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves = null;
</s> add </s> remove @serializeAsColorCurves("cameraColorCurves")
private _cameraColorCurves: ColorCurves = null;
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves;
</s> add public get cameraColorCurves(): ColorCurves {
return this._imageProcessingConfiguration.colorCurves;
}
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
public set cameraColorCurves(value: ColorCurves) {
this._imageProcessingConfiguration.colorCurves = value;
}
</s> remove @serializeAsTexture("cameraColorGradingTexture")
private _cameraColorGradingTexture: BaseTexture;
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture;
</s> add protected _imageProcessingConfiguration: ImageProcessing;
/**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
/**
* Sets the Default image processing configuration used either in the this material.
*
* If sets to null, the scene one is in use.
*/
public set imageProcessingConfiguration(value: ImageProcessing) {
this._attachImageProcessingConfiguration(value);
}
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the Standard Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
/**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
}
/**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
/**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
/**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
}
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public get cameraExposure(): number {
return this._imageProcessingConfiguration.cameraExposure;
};
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public set cameraExposure(value: number) {
this._imageProcessingConfiguration.cameraExposure = value;
};
/**
* Gets The camera contrast used on this material.
*/
public get cameraContrast(): number {
return this._imageProcessingConfiguration.cameraContrast;
}
/**
* Sets The camera contrast used on this material.
*/
public set cameraContrast(value: number) {
this._imageProcessingConfiguration.cameraContrast = value;
}
/**
* Gets the Color Grading 2D Lookup Texture.
*/
public get cameraColorGradingTexture(): BaseTexture {
return this._imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets the Color Grading 2D Lookup Texture.
*/
public set cameraColorGradingTexture(value: BaseTexture) {
this._imageProcessingConfiguration.colorGradingTexture = value;
}
</s> remove * Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
</s> add * Default configuration related to image processing available in the standard Material.
</s> remove /**
* Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
* the creation of the material.
*/
protected _useScalarInLinearSpace = false;
</s> add | [
"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/Materials/PBR/babylon.pbrBaseMaterial.ts | |
private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
| <mask> protected _reflectionTexture: BaseTexture;
<mask>
<mask> protected _emissiveTexture: BaseTexture;
<mask>
<mask> /**
<mask> * AKA Specular texture in other nomenclature.
<mask> */
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
protected _cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
protected _cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
protected _cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
protected _cameraColorCurves: ColorCurves = null;
private _cameraInfos: Vector4 = new Vector4(1.0, 1.0, 0.0, 0.0);
private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
</s> add </s> remove * Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
</s> add * Default configuration related to image processing available in the standard Material.
</s> remove * If false, it allows the output of the shader to be in hdr space (e.g. more than one) which is useful
* in combination of post process in float or half float mode.
</s> add * Secifies that the alpha is premultiplied before output (this enables alpha premultiplied blending).
* in your scene composition.
*/
protected _premultiplyAlpha = false;
/**
* A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
* And/Or ocllude the blended part.
</s> remove /**
* In this mode, the emissive informtaion will always be added to the lighting once.
* A light for instance can be thought as emissive.
*/
protected _useEmissiveAsIllumination = false;
</s> add </s> remove protected _ldrOutput = true;
</s> add protected _useAlphaFresnel = false;
@serialize()
protected _hdrLinearOutput = false;
/**
* Default configuration related to image processing available in the PBR Material.
*/
@serializeAsImageProcessing()
protected _imageProcessingConfiguration: ImageProcessing;
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the PBR Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
| [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
<mask> * Controls if refraction needs to be inverted on Y. This could be usefull for procedural texture.
<mask> */
<mask> protected _invertRefractionY = false;
<mask>
<mask> protected _opacityFresnelParameters: FresnelParameters;
<mask>
<mask> protected _emissiveFresnelParameters: FresnelParameters;
<mask>
<mask> /**
<mask> * This parameters will make the material used its opacity to control how much it is refracting aginst not.
<mask> * Materials half opaque for instance using refraction could benefit from this control.
<mask> */
<mask> protected _linkRefractionWithTransparency = false;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove @serializeAsFresnelParameters()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public opacityFresnelParameters: FresnelParameters;
@serializeAsFresnelParameters()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public emissiveFresnelParameters: FresnelParameters;
</s> add </s> remove /**
* In this mode, the emissive informtaion will always be added to the lighting once.
* A light for instance can be thought as emissive.
*/
protected _useEmissiveAsIllumination = false;
</s> add </s> remove /**
* Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
* the creation of the material.
*/
protected _useScalarInLinearSpace = false;
</s> add </s> remove * If false, it allows the output of the shader to be in hdr space (e.g. more than one) which is useful
* in combination of post process in float or half float mode.
</s> add * Secifies that the alpha is premultiplied before output (this enables alpha premultiplied blending).
* in your scene composition.
*/
protected _premultiplyAlpha = false;
/**
* A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
* And/Or ocllude the blended part.
</s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
protected _cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
protected _cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
protected _cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
protected _cameraColorCurves: ColorCurves = null;
private _cameraInfos: Vector4 = new Vector4(1.0, 1.0, 0.0, 0.0);
private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
<mask> protected _linkRefractionWithTransparency = false;
<mask>
<mask> protected _useLightmapAsShadowmap = false;
<mask>
<mask> /**
<mask> * In this mode, the emissive informtaion will always be added to the lighting once.
<mask> * A light for instance can be thought as emissive.
<mask> */
<mask> protected _useEmissiveAsIllumination = false;
<mask>
<mask> /**
<mask> * Secifies that the alpha is coming form the albedo channel alpha channel.
<mask> */
<mask> protected _useAlphaFromAlbedoTexture = false;
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove /**
* In this mode, the emissive informtaion will always be added to the lighting once.
* A light for instance can be thought as emissive.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public useEmissiveAsIllumination = false;
</s> add </s> remove protected _opacityFresnelParameters: FresnelParameters;
protected _emissiveFresnelParameters: FresnelParameters;
</s> add </s> remove * If false, it allows the output of the shader to be in hdr space (e.g. more than one) which is useful
* in combination of post process in float or half float mode.
</s> add * Secifies that the alpha is premultiplied before output (this enables alpha premultiplied blending).
* in your scene composition.
*/
protected _premultiplyAlpha = false;
/**
* A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
* And/Or ocllude the blended part.
</s> remove /**
* Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
* the creation of the material.
*/
protected _useScalarInLinearSpace = false;
</s> add </s> remove protected _ldrOutput = true;
</s> add protected _useAlphaFresnel = false;
@serialize()
protected _hdrLinearOutput = false;
/**
* Default configuration related to image processing available in the PBR Material.
*/
@serializeAsImageProcessing()
protected _imageProcessingConfiguration: ImageProcessing;
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the PBR Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
<mask> * The material will try to infer what glossiness each pixel should be.
<mask> */
<mask> protected _useAutoMicroSurfaceFromReflectivityMap = false;
<mask>
<mask> /**
<mask> * Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
<mask> * the creation of the material.
<mask> */
<mask> protected _useScalarInLinearSpace = false;
<mask>
<mask> /**
<mask> * BJS is using an harcoded light falloff based on a manually sets up range.
<mask> * In PBR, one way to represents the fallof is to use the inverse squared root algorythm.
<mask> * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.
<mask> */
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove /**
* Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
* the creation of the material.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public useScalarInLinearSpace = false;
</s> add </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
protected _cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
protected _cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
protected _cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
protected _cameraColorCurves: ColorCurves = null;
private _cameraInfos: Vector4 = new Vector4(1.0, 1.0, 0.0, 0.0);
private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
</s> add </s> remove protected _opacityFresnelParameters: FresnelParameters;
protected _emissiveFresnelParameters: FresnelParameters;
</s> add </s> remove @serializeAsTexture("cameraColorGradingTexture")
private _cameraColorGradingTexture: BaseTexture;
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture;
</s> add protected _imageProcessingConfiguration: ImageProcessing;
/**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
/**
* Sets the Default image processing configuration used either in the this material.
*
* If sets to null, the scene one is in use.
*/
public set imageProcessingConfiguration(value: ImageProcessing) {
this._attachImageProcessingConfiguration(value);
}
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the Standard Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
/**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
}
/**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
/**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
/**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
}
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public get cameraExposure(): number {
return this._imageProcessingConfiguration.cameraExposure;
};
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public set cameraExposure(value: number) {
this._imageProcessingConfiguration.cameraExposure = value;
};
/**
* Gets The camera contrast used on this material.
*/
public get cameraContrast(): number {
return this._imageProcessingConfiguration.cameraContrast;
}
/**
* Sets The camera contrast used on this material.
*/
public set cameraContrast(value: number) {
this._imageProcessingConfiguration.cameraContrast = value;
}
/**
* Gets the Color Grading 2D Lookup Texture.
*/
public get cameraColorGradingTexture(): BaseTexture {
return this._imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets the Color Grading 2D Lookup Texture.
*/
public set cameraColorGradingTexture(value: BaseTexture) {
this._imageProcessingConfiguration.colorGradingTexture = value;
}
</s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
@serializeAsTexture()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
@serializeAsColorCurves()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves = null;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
* Secifies that the alpha is premultiplied before output (this enables alpha premultiplied blending).
* in your scene composition.
*/
protected _premultiplyAlpha = false;
/**
* A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
* And/Or ocllude the blended part.
| <mask> */
<mask> protected _forceAlphaTest = false;
<mask>
<mask> /**
<mask> * If false, it allows the output of the shader to be in hdr space (e.g. more than one) which is useful
<mask> * in combination of post process in float or half float mode.
<mask> */
<mask> protected _ldrOutput = true;
<mask>
<mask> private _renderTargets = new SmartArray<RenderTargetTexture>(16);
<mask> private _worldViewProjectionMatrix = Matrix.Zero();
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove protected _ldrOutput = true;
</s> add protected _useAlphaFresnel = false;
@serialize()
protected _hdrLinearOutput = false;
/**
* Default configuration related to image processing available in the PBR Material.
*/
@serializeAsImageProcessing()
protected _imageProcessingConfiguration: ImageProcessing;
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the PBR Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
</s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
protected _cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
protected _cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
protected _cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
protected _cameraColorCurves: ColorCurves = null;
private _cameraInfos: Vector4 = new Vector4(1.0, 1.0, 0.0, 0.0);
private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
</s> add </s> remove @serializeAsColorCurves("cameraColorCurves")
private _cameraColorCurves: ColorCurves = null;
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves;
</s> add public get cameraColorCurves(): ColorCurves {
return this._imageProcessingConfiguration.colorCurves;
}
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
public set cameraColorCurves(value: ColorCurves) {
this._imageProcessingConfiguration.colorCurves = value;
}
</s> remove /**
* Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
* the creation of the material.
*/
protected _useScalarInLinearSpace = false;
</s> add </s> remove protected _opacityFresnelParameters: FresnelParameters;
protected _emissiveFresnelParameters: FresnelParameters;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
protected _useAlphaFresnel = false;
@serialize()
protected _hdrLinearOutput = false;
/**
* Default configuration related to image processing available in the PBR Material.
*/
@serializeAsImageProcessing()
protected _imageProcessingConfiguration: ImageProcessing;
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the PBR Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
| <mask> /**
<mask> * If false, it allows the output of the shader to be in hdr space (e.g. more than one) which is useful
<mask> * in combination of post process in float or half float mode.
<mask> */
<mask> protected _ldrOutput = true;
<mask>
<mask> private _renderTargets = new SmartArray<RenderTargetTexture>(16);
<mask> private _worldViewProjectionMatrix = Matrix.Zero();
<mask> private _globalAmbientColor = new Color3(0, 0, 0);
<mask> private _tempColor = new Color3();
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove * If false, it allows the output of the shader to be in hdr space (e.g. more than one) which is useful
* in combination of post process in float or half float mode.
</s> add * Secifies that the alpha is premultiplied before output (this enables alpha premultiplied blending).
* in your scene composition.
*/
protected _premultiplyAlpha = false;
/**
* A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
* And/Or ocllude the blended part.
</s> remove public vignetteStretch = 0;
public vignetteCentreX = 0;
public vignetteCentreY = 0;
public vignetteWeight = 1.5;
public vignetteColor: BABYLON.Color4 = new BABYLON.Color4(0, 0, 0, 0);
private _vignetteBlendMode = ImageProcessingPostProcess.VIGNETTEMODE_MULTIPLY;
private _vignetteEnabled = true;
public cameraContrast = 1.0;
public cameraExposure = 1.68;
private _cameraToneMappingEnabled = true;
private _fromLinearSpace = false;
</s> add /**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
</s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
protected _cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
protected _cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
protected _cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
protected _cameraColorCurves: ColorCurves = null;
private _cameraInfos: Vector4 = new Vector4(1.0, 1.0, 0.0, 0.0);
private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
</s> add </s> remove public cameraFov = 0.5;
</s> add /**
* Default configuration related to image processing available in the PBR Material.
*/
protected _imageProcessingConfiguration: ImageProcessing;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
// Setup the default processing configuration to the scene.
this._attachImageProcessingConfiguration(null);
| <mask> super(name, scene);
<mask>
<mask> this.getRenderTargetTextures = (): SmartArray<RenderTargetTexture> => {
<mask> this._renderTargets.reset();
<mask>
<mask> if (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
<mask> this._renderTargets.push(this._reflectionTexture);
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove this._useEmissiveAsIllumination = true;
</s> add </s> remove if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
defines.OPACITYFRESNEL = true;
}
</s> add if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, this._activeEffect);
}
</s> add </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, effect);
}
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
return (this.alpha < 1.0) || (this._opacityTexture != null) || this._shouldUseAlphaFromAlbedoTexture();
| <mask> public needAlphaBlending(): boolean {
<mask> if (this._linkRefractionWithTransparency) {
<mask> return false;
<mask> }
<mask> return (this.alpha < 1.0) || (this._opacityTexture != null) || this._shouldUseAlphaFromAlbedoTexture() || this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled;
<mask> }
<mask>
<mask> public needAlphaTesting(): boolean {
<mask> if (this._linkRefractionWithTransparency) {
<mask> return false;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (defines._areFresnelDirty) {
if (StandardMaterial.FresnelEnabled) {
// Fresnel
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
</s> add if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> remove if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
}
</s> add if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
</s> remove defines.ALPHATESTVALUE = this._alphaCutOff;
defines.ALPHABLEND = this.needAlphaBlending();
</s> add if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
</s> remove if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> add if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> remove // Fresnel
if (StandardMaterial.FresnelEnabled) {
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
this._uniformBuffer.updateColor4("opacityParts", new Color3(this._opacityFresnelParameters.leftColor.toLuminance(), this._opacityFresnelParameters.rightColor.toLuminance(), this._opacityFresnelParameters.bias), this._opacityFresnelParameters.power);
}
if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
this._uniformBuffer.updateColor4("emissiveLeftColor", this._emissiveFresnelParameters.leftColor, this._emissiveFresnelParameters.power);
this._uniformBuffer.updateColor4("emissiveRightColor", this._emissiveFresnelParameters.rightColor, this._emissiveFresnelParameters.bias);
}
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
<mask> public getAlphaTestTexture(): BaseTexture {
<mask> return this._albedoTexture;
<mask> }
<mask>
<mask> private convertColorToLinearSpaceToRef(color: Color3, ref: Color3): void {
<mask> PBRMaterial.convertColorToLinearSpaceToRef(color, ref, this._useScalarInLinearSpace);
<mask> }
<mask>
<mask> private static convertColorToLinearSpaceToRef(color: Color3, ref: Color3, useScalarInLinear: boolean): void {
<mask> if (!useScalarInLinear) {
<mask> color.toLinearSpaceToRef(ref);
<mask> } else {
<mask> ref.r = color.r;
<mask> ref.g = color.g;
<mask> ref.b = color.b;
<mask> }
<mask> }
<mask>
<mask> private static _scaledAlbedo = new Color3();
<mask> private static _scaledReflectivity = new Color3();
<mask> private static _scaledEmissive = new Color3();
<mask> private static _scaledReflection = new Color3();
<mask>
<mask> public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, useScalarInLinearSpace: boolean, maxSimultaneousLights: number, usePhysicalLightFalloff: boolean) {
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove private static _scaledEmissive = new Color3();
private static _scaledReflection = new Color3();
public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, useScalarInLinearSpace: boolean, maxSimultaneousLights: number, usePhysicalLightFalloff: boolean) {
var lightIndex = 0;
for (var light of mesh._lightSources) {
let useUbo = light._uniformBuffer.useUbo;
let scaledIntensity = light.getScaledIntensity();
light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
MaterialHelper.BindLightProperties(light, effect, lightIndex);
// GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(light.diffuse, PBRMaterial._scaledAlbedo, useScalarInLinearSpace);
PBRMaterial._scaledAlbedo.scaleToRef(scaledIntensity, PBRMaterial._scaledAlbedo);
light._uniformBuffer.updateColor4(useUbo ? "vLightDiffuse" : "vLightDiffuse" + lightIndex, PBRMaterial._scaledAlbedo, usePhysicalLightFalloff ? light.radius : light.range);
if (defines["SPECULARTERM"]) {
this.convertColorToLinearSpaceToRef(light.specular, PBRMaterial._scaledReflectivity, useScalarInLinearSpace);
PBRMaterial._scaledReflectivity.scaleToRef(scaledIntensity, PBRMaterial._scaledReflectivity);
light._uniformBuffer.updateColor3(useUbo ? "vLightSpecular" : "vLightSpecular" + lightIndex, PBRMaterial._scaledReflectivity);
}
// Shadows
if (scene.shadowsEnabled) {
MaterialHelper.BindLightShadow(light, scene, mesh, lightIndex + "", effect);
}
light._uniformBuffer.update();
lightIndex++;
if (lightIndex === maxSimultaneousLights)
break;
}
}
</s> add </s> remove public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4) {
</s> add public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4, , usePhysicalLightFalloff = false) {
</s> remove public static get VIGNETTEMODE_MULTIPLY(): number {
return ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY;
}
</s> add var uniforms = [];
ImageProcessing.PrepareUniforms(uniforms, this._defines);
</s> remove if (this.cameraToneMappingEnabled) {
defines += "#define TONEMAPPING\r\n";
}
if (this._colorCurvesEnabled && this.colorCurves) {
defines += "#define COLORCURVES\r\n";
}
if (this._fromLinearSpace) {
defines += "#define FROMLINEARSPACE\r\n";
}
this.updateEffect(defines, null, samplers);
}
// Statics
private static _VIGNETTEMODE_MULTIPLY = 0;
private static _VIGNETTEMODE_OPAQUE = 1;
</s> add var samplers = ["textureSampler"];
ImageProcessing.PrepareSamplers(samplers, this._defines);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"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/Materials/PBR/babylon.pbrBaseMaterial.ts | |
<mask> }
<mask>
<mask> private static _scaledAlbedo = new Color3();
<mask> private static _scaledReflectivity = new Color3();
<mask> private static _scaledEmissive = new Color3();
<mask> private static _scaledReflection = new Color3();
<mask>
<mask> public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, useScalarInLinearSpace: boolean, maxSimultaneousLights: number, usePhysicalLightFalloff: boolean) {
<mask> var lightIndex = 0;
<mask> for (var light of mesh._lightSources) {
<mask> let useUbo = light._uniformBuffer.useUbo;
<mask> let scaledIntensity = light.getScaledIntensity();
<mask>
<mask> light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
<mask> MaterialHelper.BindLightProperties(light, effect, lightIndex);
<mask>
<mask> // GAMMA CORRECTION.
<mask> this.convertColorToLinearSpaceToRef(light.diffuse, PBRMaterial._scaledAlbedo, useScalarInLinearSpace);
<mask>
<mask> PBRMaterial._scaledAlbedo.scaleToRef(scaledIntensity, PBRMaterial._scaledAlbedo);
<mask> light._uniformBuffer.updateColor4(useUbo ? "vLightDiffuse" : "vLightDiffuse" + lightIndex, PBRMaterial._scaledAlbedo, usePhysicalLightFalloff ? light.radius : light.range);
<mask>
<mask> if (defines["SPECULARTERM"]) {
<mask> this.convertColorToLinearSpaceToRef(light.specular, PBRMaterial._scaledReflectivity, useScalarInLinearSpace);
<mask>
<mask> PBRMaterial._scaledReflectivity.scaleToRef(scaledIntensity, PBRMaterial._scaledReflectivity);
<mask> light._uniformBuffer.updateColor3(useUbo ? "vLightSpecular" : "vLightSpecular" + lightIndex, PBRMaterial._scaledReflectivity);
<mask> }
<mask>
<mask> // Shadows
<mask> if (scene.shadowsEnabled) {
<mask> MaterialHelper.BindLightShadow(light, scene, mesh, lightIndex + "", effect);
<mask> }
<mask>
<mask> light._uniformBuffer.update();
<mask>
<mask> lightIndex++;
<mask>
<mask> if (lightIndex === maxSimultaneousLights)
<mask> break;
<mask> }
<mask> }
<mask>
<mask> public isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean {
<mask> if (this.isFrozen) {
<mask> if (this._wasPreviouslyReady) {
<mask> return true;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove private convertColorToLinearSpaceToRef(color: Color3, ref: Color3): void {
PBRMaterial.convertColorToLinearSpaceToRef(color, ref, this._useScalarInLinearSpace);
}
private static convertColorToLinearSpaceToRef(color: Color3, ref: Color3, useScalarInLinear: boolean): void {
if (!useScalarInLinear) {
color.toLinearSpaceToRef(ref);
} else {
ref.r = color.r;
ref.g = color.g;
ref.b = color.b;
}
}
private static _scaledAlbedo = new Color3();
</s> add </s> remove public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4) {
</s> add public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4, , usePhysicalLightFalloff = false) {
</s> remove light.diffuse.scaleToRef(light.intensity, Tmp.Color3[0]);
light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], light.range, lightIndex + "");
</s> add light.diffuse.scaleToRef(scaledIntensity, Tmp.Color3[0]);
light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], usePhysicalLightFalloff ? light.radius : light.range, lightIndex + "");
</s> remove public static get VIGNETTEMODE_MULTIPLY(): number {
return ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY;
}
</s> add var uniforms = [];
ImageProcessing.PrepareUniforms(uniforms, this._defines);
| [
"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/Materials/PBR/babylon.pbrBaseMaterial.ts | |
<mask> if (scene.getEngine().getCaps().textureLOD) {
<mask> defines.LODBASEDMICROSFURACE = true;
<mask> }
<mask>
<mask> defines.LDROUTPUT = this._ldrOutput;
<mask>
<mask> if (this._albedoTexture && StandardMaterial.DiffuseTextureEnabled) {
<mask> if (!this._albedoTexture.isReadyOrNotBlocking()) {
<mask> return false;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add </s> remove if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Camera Color Grading can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
} else {
defines.CAMERACOLORGRADING = true;
}
} else {
defines.CAMERACOLORGRADING = false;
}
</s> add </s> remove defines.FRESNEL = true;
}
</s> add if (!this._imageProcessingConfiguration.isReady()) {
return false;
</s> remove // Fresnel
if (StandardMaterial.FresnelEnabled) {
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
this._uniformBuffer.updateColor4("opacityParts", new Color3(this._opacityFresnelParameters.leftColor.toLuminance(), this._opacityFresnelParameters.rightColor.toLuminance(), this._opacityFresnelParameters.bias), this._opacityFresnelParameters.power);
}
if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
this._uniformBuffer.updateColor4("emissiveLeftColor", this._emissiveFresnelParameters.leftColor, this._emissiveFresnelParameters.power);
this._uniformBuffer.updateColor4("emissiveRightColor", this._emissiveFresnelParameters.rightColor, this._emissiveFresnelParameters.bias);
}
}
</s> add </s> remove if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
defines.OPACITYFRESNEL = true;
}
</s> add if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
<mask> defines.USEPMREMREFRACTION = true;
<mask> }
<mask> }
<mask> }
<mask>
<mask> if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
<mask> // Color Grading texure can not be none blocking.
<mask> if (!this._cameraColorGradingTexture.isReady()) {
<mask> return false;
<mask> }
<mask>
<mask> defines.CAMERACOLORGRADING = true;
<mask> }
<mask>
<mask> if (!this.backFaceCulling && this._twoSidedLighting) {
<mask> defines.TWOSIDEDLIGHTING = true;
<mask> }
<mask>
<mask> if (this._shouldUseAlphaFromAlbedoTexture()) {
<mask> defines.ALPHAFROMALBEDO = true;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Camera Color Grading can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
} else {
defines.CAMERACOLORGRADING = true;
}
} else {
defines.CAMERACOLORGRADING = false;
}
</s> add </s> remove if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
defines.OPACITYFRESNEL = true;
}
</s> add if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
</s> remove if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
}
</s> add if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
</s> remove defines.FRESNEL = true;
}
</s> add if (!this._imageProcessingConfiguration.isReady()) {
return false;
| [
"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/Materials/PBR/babylon.pbrBaseMaterial.ts | |
}
| <mask> if (this._shouldUseAlphaFromAlbedoTexture()) {
<mask> defines.ALPHAFROMALBEDO = true;
<mask> }
<mask>
<mask> if (this._useEmissiveAsIllumination) {
<mask> defines.EMISSIVEASILLUMINATION = true;
<mask> }
<mask>
<mask> if (this._cameraContrast != 1) {
<mask> defines.CAMERACONTRAST = true;
<mask> }
<mask>
<mask> if (this._cameraExposure != 1) {
<mask> defines.CAMERATONEMAP = true;
<mask> }
<mask>
<mask> if (this._cameraColorCurves) {
<mask> defines.CAMERACOLORCURVES = true;
<mask> }
<mask>
<mask> if (this._useSpecularOverAlpha) {
<mask> defines.SPECULAROVERALPHA = true;
<mask> }
<mask>
<mask> if (this._usePhysicalLightFalloff) {
<mask> defines.USEPHYSICALLIGHTFALLOFF = true;
<mask> }
<mask>
<mask> if (this._useRadianceOverAlpha) {
<mask> defines.RADIANCEOVERALPHA = true;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
}
</s> add if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
</s> remove if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> add if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add </s> remove defines.ALPHATESTVALUE = this._alphaCutOff;
defines.ALPHABLEND = this.needAlphaBlending();
</s> add if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
</s> remove if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
defines.EMISSIVEFRESNEL = true;
}
</s> add defines.ALPHATESTVALUE = this._alphaCutOff;
defines.HDRLINEAROUTPUT = this._hdrLinearOutput;
defines.PREMULTIPLYALPHA = this._premultiplyAlpha;
defines.ALPHABLEND = this.needAlphaBlending();
defines.ALPHAFRESNEL = this._useAlphaFresnel;
| [
"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/Materials/PBR/babylon.pbrBaseMaterial.ts |
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
| <mask> if (this._usePhysicalLightFalloff) {
<mask> defines.USEPHYSICALLIGHTFALLOFF = true;
<mask> }
<mask>
<mask> if (this._useRadianceOverAlpha) {
<mask> defines.RADIANCEOVERALPHA = true;
<mask> }
<mask>
<mask> if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
<mask> defines.METALLICWORKFLOW = true;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> add if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> remove defines.ALPHATESTVALUE = this._alphaCutOff;
defines.ALPHABLEND = this.needAlphaBlending();
</s> add if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
</s> remove if (defines._areFresnelDirty) {
if (StandardMaterial.FresnelEnabled) {
// Fresnel
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
</s> add if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> remove defines.CAMERACOLORCURVES = (this._cameraColorCurves !== undefined && this._cameraColorCurves !== null);
</s> add if (!this.imageProcessingConfiguration.isReady()) {
return false;
}
this.imageProcessingConfiguration.prepareDefines(defines);
</s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
| <mask> if (this._useRadianceOverAlpha) {
<mask> defines.RADIANCEOVERALPHA = true;
<mask> }
<mask>
<mask> if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
<mask> defines.METALLICWORKFLOW = true;
<mask> }
<mask>
<mask> defines.ALPHATESTVALUE = this._alphaCutOff;
<mask> defines.ALPHABLEND = this.needAlphaBlending();
<mask> }
<mask> }
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove defines.ALPHATESTVALUE = this._alphaCutOff;
defines.ALPHABLEND = this.needAlphaBlending();
</s> add if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
</s> remove if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
}
</s> add if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
</s> remove if (defines._areFresnelDirty) {
if (StandardMaterial.FresnelEnabled) {
// Fresnel
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
</s> add if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> remove defines.CAMERACOLORCURVES = (this._cameraColorCurves !== undefined && this._cameraColorCurves !== null);
</s> add if (!this.imageProcessingConfiguration.isReady()) {
return false;
}
this.imageProcessingConfiguration.prepareDefines(defines);
</s> remove if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
defines.EMISSIVEFRESNEL = true;
}
</s> add defines.ALPHATESTVALUE = this._alphaCutOff;
defines.HDRLINEAROUTPUT = this._hdrLinearOutput;
defines.PREMULTIPLYALPHA = this._premultiplyAlpha;
defines.ALPHABLEND = this.needAlphaBlending();
defines.ALPHAFRESNEL = this._useAlphaFresnel;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
| <mask> if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
<mask> defines.METALLICWORKFLOW = true;
<mask> }
<mask>
<mask> defines.ALPHATESTVALUE = this._alphaCutOff;
<mask> defines.ALPHABLEND = this.needAlphaBlending();
<mask> }
<mask> }
<mask>
<mask> if (defines._areFresnelDirty) {
<mask> if (StandardMaterial.FresnelEnabled) {
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> add if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> remove if (defines._areFresnelDirty) {
if (StandardMaterial.FresnelEnabled) {
// Fresnel
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
</s> add if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> remove if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
}
</s> add if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
</s> remove }
</s> add </s> remove defines.CAMERACOLORCURVES = (this._cameraColorCurves !== undefined && this._cameraColorCurves !== null);
</s> add if (!this.imageProcessingConfiguration.isReady()) {
return false;
}
this.imageProcessingConfiguration.prepareDefines(defines);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
<mask>
<mask> defines.ALPHATESTVALUE = this._alphaCutOff;
<mask> defines.ALPHABLEND = this.needAlphaBlending();
<mask> }
<mask> }
<mask>
<mask> if (defines._areFresnelDirty) {
<mask> if (StandardMaterial.FresnelEnabled) {
<mask> // Fresnel
<mask> if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (defines._areFresnelDirty) {
if (StandardMaterial.FresnelEnabled) {
// Fresnel
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
</s> add if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> remove defines.ALPHATESTVALUE = this._alphaCutOff;
defines.ALPHABLEND = this.needAlphaBlending();
</s> add if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
</s> remove if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
defines.EMISSIVEFRESNEL = true;
}
</s> add defines.ALPHATESTVALUE = this._alphaCutOff;
defines.HDRLINEAROUTPUT = this._hdrLinearOutput;
defines.PREMULTIPLYALPHA = this._premultiplyAlpha;
defines.ALPHABLEND = this.needAlphaBlending();
defines.ALPHAFRESNEL = this._useAlphaFresnel;
</s> remove if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> add if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> remove if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
defines.OPACITYFRESNEL = true;
}
</s> add if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
| <mask> defines.ALPHABLEND = this.needAlphaBlending();
<mask> }
<mask> }
<mask>
<mask> if (defines._areFresnelDirty) {
<mask> if (StandardMaterial.FresnelEnabled) {
<mask> // Fresnel
<mask> if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
<mask> this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
<mask>
<mask> if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
<mask> defines.OPACITYFRESNEL = true;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
defines.OPACITYFRESNEL = true;
}
</s> add if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> remove }
</s> add </s> remove if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
defines.EMISSIVEFRESNEL = true;
}
</s> add defines.ALPHATESTVALUE = this._alphaCutOff;
defines.HDRLINEAROUTPUT = this._hdrLinearOutput;
defines.PREMULTIPLYALPHA = this._premultiplyAlpha;
defines.ALPHABLEND = this.needAlphaBlending();
defines.ALPHAFRESNEL = this._useAlphaFresnel;
</s> remove defines.ALPHATESTVALUE = this._alphaCutOff;
defines.ALPHABLEND = this.needAlphaBlending();
</s> add if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
</s> remove // Fresnel
if (StandardMaterial.FresnelEnabled) {
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
this._uniformBuffer.updateColor4("opacityParts", new Color3(this._opacityFresnelParameters.leftColor.toLuminance(), this._opacityFresnelParameters.rightColor.toLuminance(), this._opacityFresnelParameters.bias), this._opacityFresnelParameters.power);
}
if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
this._uniformBuffer.updateColor4("emissiveLeftColor", this._emissiveFresnelParameters.leftColor, this._emissiveFresnelParameters.power);
this._uniformBuffer.updateColor4("emissiveRightColor", this._emissiveFresnelParameters.rightColor, this._emissiveFresnelParameters.bias);
}
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
| <mask> // Fresnel
<mask> if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
<mask> this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
<mask>
<mask> if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
<mask> defines.OPACITYFRESNEL = true;
<mask> }
<mask>
<mask> if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
<mask> defines.EMISSIVEFRESNEL = true;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (defines._areFresnelDirty) {
if (StandardMaterial.FresnelEnabled) {
// Fresnel
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
</s> add if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> remove if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
defines.EMISSIVEFRESNEL = true;
}
</s> add defines.ALPHATESTVALUE = this._alphaCutOff;
defines.HDRLINEAROUTPUT = this._hdrLinearOutput;
defines.PREMULTIPLYALPHA = this._premultiplyAlpha;
defines.ALPHABLEND = this.needAlphaBlending();
defines.ALPHAFRESNEL = this._useAlphaFresnel;
</s> remove // Fresnel
if (StandardMaterial.FresnelEnabled) {
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
this._uniformBuffer.updateColor4("opacityParts", new Color3(this._opacityFresnelParameters.leftColor.toLuminance(), this._opacityFresnelParameters.rightColor.toLuminance(), this._opacityFresnelParameters.bias), this._opacityFresnelParameters.power);
}
if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
this._uniformBuffer.updateColor4("emissiveLeftColor", this._emissiveFresnelParameters.leftColor, this._emissiveFresnelParameters.power);
this._uniformBuffer.updateColor4("emissiveRightColor", this._emissiveFresnelParameters.rightColor, this._emissiveFresnelParameters.bias);
}
}
</s> add </s> remove defines.FRESNEL = true;
}
</s> add if (!this._imageProcessingConfiguration.isReady()) {
return false;
</s> remove }
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
defines.ALPHATESTVALUE = this._alphaCutOff;
defines.HDRLINEAROUTPUT = this._hdrLinearOutput;
defines.PREMULTIPLYALPHA = this._premultiplyAlpha;
defines.ALPHABLEND = this.needAlphaBlending();
defines.ALPHAFRESNEL = this._useAlphaFresnel;
| <mask> if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
<mask> defines.OPACITYFRESNEL = true;
<mask> }
<mask>
<mask> if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
<mask> defines.EMISSIVEFRESNEL = true;
<mask> }
<mask>
<mask> defines.FRESNEL = true;
<mask> }
<mask> }
<mask> }
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
defines.OPACITYFRESNEL = true;
}
</s> add if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> remove defines.FRESNEL = true;
}
</s> add if (!this._imageProcessingConfiguration.isReady()) {
return false;
</s> remove if (defines._areFresnelDirty) {
if (StandardMaterial.FresnelEnabled) {
// Fresnel
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
</s> add if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add </s> remove if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
}
</s> add if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
if (!this._imageProcessingConfiguration.isReady()) {
return false;
| <mask> if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
<mask> defines.EMISSIVEFRESNEL = true;
<mask> }
<mask>
<mask> defines.FRESNEL = true;
<mask> }
<mask> }
<mask> }
<mask>
<mask> // Misc.
<mask> MaterialHelper.PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, defines);
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove }
</s> add
this._imageProcessingConfiguration.prepareDefines(defines);
}
</s> remove if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
defines.EMISSIVEFRESNEL = true;
}
</s> add defines.ALPHATESTVALUE = this._alphaCutOff;
defines.HDRLINEAROUTPUT = this._hdrLinearOutput;
defines.PREMULTIPLYALPHA = this._premultiplyAlpha;
defines.ALPHABLEND = this.needAlphaBlending();
defines.ALPHAFRESNEL = this._useAlphaFresnel;
</s> remove if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
defines.OPACITYFRESNEL = true;
}
</s> add if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> remove if (defines._areFresnelDirty) {
if (StandardMaterial.FresnelEnabled) {
// Fresnel
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
</s> add if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
this._imageProcessingConfiguration.prepareDefines(defines);
}
| <mask>
<mask> defines.FRESNEL = true;
<mask> }
<mask> }
<mask> }
<mask>
<mask> // Misc.
<mask> MaterialHelper.PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, defines);
<mask>
<mask> // Values that need to be evaluated on every frame
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove defines.FRESNEL = true;
}
</s> add if (!this._imageProcessingConfiguration.isReady()) {
return false;
</s> remove if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
defines.EMISSIVEFRESNEL = true;
}
</s> add defines.ALPHATESTVALUE = this._alphaCutOff;
defines.HDRLINEAROUTPUT = this._hdrLinearOutput;
defines.PREMULTIPLYALPHA = this._premultiplyAlpha;
defines.ALPHABLEND = this.needAlphaBlending();
defines.ALPHAFRESNEL = this._useAlphaFresnel;
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add </s> remove if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Camera Color Grading can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
} else {
defines.CAMERACOLORGRADING = true;
}
} else {
defines.CAMERACOLORGRADING = false;
}
</s> add </s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
<mask> if (defines.SPECULARTERM) {
<mask> fallbacks.addFallback(0, "SPECULARTERM");
<mask> }
<mask>
<mask> if (defines.OPACITYFRESNEL) {
<mask> fallbacks.addFallback(1, "OPACITYFRESNEL");
<mask> }
<mask>
<mask> if (defines.EMISSIVEFRESNEL) {
<mask> fallbacks.addFallback(2, "EMISSIVEFRESNEL");
<mask> }
<mask>
<mask> if (defines.FRESNEL) {
<mask> fallbacks.addFallback(3, "FRESNEL");
<mask> }
<mask>
<mask> if (defines.NUM_BONE_INFLUENCERS > 0) {
<mask> fallbacks.addCPUSkinningFallback(0, mesh);
<mask> }
<mask>
<mask> //Attributes
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
if (this._cameraColorGradingTexture && this._cameraColorGradingTexture.animations && this._cameraColorGradingTexture.animations.length > 0) {
results.push(this._cameraColorGradingTexture);
}
</s> add </s> remove
if (this._cameraColorGradingTexture && this._cameraColorGradingTexture.animations && this._cameraColorGradingTexture.animations.length > 0) {
results.push(this._cameraColorGradingTexture);
}
</s> add </s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
</s> remove
if (this._cameraColorGradingTexture) {
this._cameraColorGradingTexture.dispose();
}
</s> add }
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add | [
"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/Materials/PBR/babylon.pbrBaseMaterial.ts | |
<mask> "vFogInfos", "vFogColor", "pointSize",
<mask> "vAlbedoInfos", "vAmbientInfos", "vOpacityInfos", "vReflectionInfos", "vEmissiveInfos", "vReflectivityInfos", "vMicroSurfaceSamplerInfos", "vBumpInfos", "vLightmapInfos", "vRefractionInfos",
<mask> "mBones",
<mask> "vClipPlane", "albedoMatrix", "ambientMatrix", "opacityMatrix", "reflectionMatrix", "emissiveMatrix", "reflectivityMatrix", "microSurfaceSamplerMatrix", "bumpMatrix", "lightmapMatrix", "refractionMatrix",
<mask> "opacityParts", "emissiveLeftColor", "emissiveRightColor",
<mask> "vLightingIntensity",
<mask> "logarithmicDepthConstant",
<mask> "vSphericalX", "vSphericalY", "vSphericalZ",
<mask> "vSphericalXX", "vSphericalYY", "vSphericalZZ",
<mask> "vSphericalXY", "vSphericalYZ", "vSphericalZX",
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove "vMicrosurfaceTextureLods",
"vCameraInfos"
</s> add "vMicrosurfaceTextureLods"
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, effect);
}
</s> add </s> remove
if (this._cameraColorGradingTexture && this._cameraColorGradingTexture.animations && this._cameraColorGradingTexture.animations.length > 0) {
results.push(this._cameraColorGradingTexture);
}
</s> add </s> remove @serializeAsFresnelParameters()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public opacityFresnelParameters: FresnelParameters;
@serializeAsFresnelParameters()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public emissiveFresnelParameters: FresnelParameters;
</s> add </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
@serializeAsTexture()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
@serializeAsColorCurves()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves = null;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
"vMicrosurfaceTextureLods"
| <mask> "logarithmicDepthConstant",
<mask> "vSphericalX", "vSphericalY", "vSphericalZ",
<mask> "vSphericalXX", "vSphericalYY", "vSphericalZZ",
<mask> "vSphericalXY", "vSphericalYZ", "vSphericalZX",
<mask> "vMicrosurfaceTextureLods",
<mask> "vCameraInfos"
<mask> ];
<mask>
<mask> var samplers = ["albedoSampler", "ambientSampler", "opacitySampler", "reflectionCubeSampler", "reflection2DSampler", "emissiveSampler", "reflectivitySampler", "microSurfaceSampler", "bumpSampler", "lightmapSampler", "refractionCubeSampler", "refraction2DSampler"];
<mask> var uniformBuffers = ["Material", "Scene"];
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (defines.CAMERACOLORCURVES) {
ColorCurves.PrepareUniforms(uniforms);
}
if (defines.CAMERACOLORGRADING) {
ColorGradingTexture.PrepareUniformsAndSamplers(uniforms, samplers);
}
</s> add ImageProcessing.PrepareUniforms(uniforms, defines);
ImageProcessing.PrepareSamplers(samplers, defines);
</s> remove if (defines.CAMERACOLORCURVES) {
ColorCurves.PrepareUniforms(uniforms);
}
if (defines.CAMERACOLORGRADING) {
ColorGradingTexture.PrepareUniformsAndSamplers(uniforms, samplers);
}
</s> add ImageProcessing.PrepareUniforms(uniforms, defines);
ImageProcessing.PrepareSamplers(samplers, defines);
</s> remove "opacityParts", "emissiveLeftColor", "emissiveRightColor",
</s> add </s> remove var samplers = ["textureSampler"];
if (this.colorGradingTexture) {
defines = "#define COLORGRADING\r\n";
samplers.push("txColorTransform");
}
if (this._vignetteEnabled) {
defines += "#define VIGNETTE\r\n";
if (this.vignetteBlendMode === ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY) {
defines += "#define VIGNETTEBLENDMODEMULTIPLY\r\n";
} else {
defines += "#define VIGNETTEBLENDMODEOPAQUE\r\n";
</s> add for (const define in this._defines) {
if (this._defines[define]) {
defines += `#define ${define};\r\n`;
</s> remove if (this.cameraToneMappingEnabled) {
defines += "#define TONEMAPPING\r\n";
}
if (this._colorCurvesEnabled && this.colorCurves) {
defines += "#define COLORCURVES\r\n";
}
if (this._fromLinearSpace) {
defines += "#define FROMLINEARSPACE\r\n";
}
this.updateEffect(defines, null, samplers);
}
// Statics
private static _VIGNETTEMODE_MULTIPLY = 0;
private static _VIGNETTEMODE_OPAQUE = 1;
</s> add var samplers = ["textureSampler"];
ImageProcessing.PrepareSamplers(samplers, this._defines);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
ImageProcessing.PrepareUniforms(uniforms, defines);
ImageProcessing.PrepareSamplers(samplers, defines);
| <mask>
<mask> var samplers = ["albedoSampler", "ambientSampler", "opacitySampler", "reflectionCubeSampler", "reflection2DSampler", "emissiveSampler", "reflectivitySampler", "microSurfaceSampler", "bumpSampler", "lightmapSampler", "refractionCubeSampler", "refraction2DSampler"];
<mask> var uniformBuffers = ["Material", "Scene"];
<mask>
<mask> if (defines.CAMERACOLORCURVES) {
<mask> ColorCurves.PrepareUniforms(uniforms);
<mask> }
<mask> if (defines.CAMERACOLORGRADING) {
<mask> ColorGradingTexture.PrepareUniformsAndSamplers(uniforms, samplers);
<mask> }
<mask> MaterialHelper.PrepareUniformsAndSamplersList(<EffectCreationOptions>{
<mask> uniformsNames: uniforms,
<mask> uniformBuffersNames: uniformBuffers,
<mask> samplers: samplers,
<mask> defines: defines,
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (defines.CAMERACOLORCURVES) {
ColorCurves.PrepareUniforms(uniforms);
}
if (defines.CAMERACOLORGRADING) {
ColorGradingTexture.PrepareUniformsAndSamplers(uniforms, samplers);
}
</s> add ImageProcessing.PrepareUniforms(uniforms, defines);
ImageProcessing.PrepareSamplers(samplers, defines);
</s> remove "vMicrosurfaceTextureLods",
"vCameraInfos"
</s> add "vMicrosurfaceTextureLods"
</s> remove if (this.cameraToneMappingEnabled) {
defines += "#define TONEMAPPING\r\n";
}
if (this._colorCurvesEnabled && this.colorCurves) {
defines += "#define COLORCURVES\r\n";
}
if (this._fromLinearSpace) {
defines += "#define FROMLINEARSPACE\r\n";
}
this.updateEffect(defines, null, samplers);
}
// Statics
private static _VIGNETTEMODE_MULTIPLY = 0;
private static _VIGNETTEMODE_OPAQUE = 1;
</s> add var samplers = ["textureSampler"];
ImageProcessing.PrepareSamplers(samplers, this._defines);
</s> remove var samplers = ["textureSampler"];
if (this.colorGradingTexture) {
defines = "#define COLORGRADING\r\n";
samplers.push("txColorTransform");
}
if (this._vignetteEnabled) {
defines += "#define VIGNETTE\r\n";
if (this.vignetteBlendMode === ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY) {
defines += "#define VIGNETTEBLENDMODEMULTIPLY\r\n";
} else {
defines += "#define VIGNETTEBLENDMODEOPAQUE\r\n";
</s> add for (const define in this._defines) {
if (this._defines[define]) {
defines += `#define ${define};\r\n`;
</s> remove this._colorGradingTexture = value;
</s> add // Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
var camera = this.getCamera();
var scene = camera ? camera.getScene() : BABYLON.Engine.LastCreatedScene;
this._imageProcessingConfiguration = scene.imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._updateParameters();
});
// Ensure the effect will be rebuilt.
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
<mask>
<mask> this._uniformBuffer.addUniform("vMicrosurfaceTextureLods", 2);
<mask> this._uniformBuffer.addUniform("vReflectivityColor", 4);
<mask> this._uniformBuffer.addUniform("vEmissiveColor", 3);
<mask> this._uniformBuffer.addUniform("opacityParts", 4);
<mask> this._uniformBuffer.addUniform("emissiveLeftColor", 4);
<mask> this._uniformBuffer.addUniform("emissiveRightColor", 4);
<mask>
<mask> this._uniformBuffer.addUniform("pointSize", 1);
<mask> this._uniformBuffer.create();
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
if (this._cameraColorGradingTexture) {
this._cameraColorGradingTexture.dispose();
}
</s> add }
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, effect);
}
</s> add </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, this._activeEffect);
}
</s> add </s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
<mask> this.bindViewProjection(effect);
<mask>
<mask> if (!this._uniformBuffer.useUbo || !this.isFrozen || !this._uniformBuffer.isSync) {
<mask>
<mask> // Fresnel
<mask> if (StandardMaterial.FresnelEnabled) {
<mask> if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
<mask> this._uniformBuffer.updateColor4("opacityParts", new Color3(this._opacityFresnelParameters.leftColor.toLuminance(), this._opacityFresnelParameters.rightColor.toLuminance(), this._opacityFresnelParameters.bias), this._opacityFresnelParameters.power);
<mask> }
<mask>
<mask> if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
<mask> this._uniformBuffer.updateColor4("emissiveLeftColor", this._emissiveFresnelParameters.leftColor, this._emissiveFresnelParameters.power);
<mask> this._uniformBuffer.updateColor4("emissiveRightColor", this._emissiveFresnelParameters.rightColor, this._emissiveFresnelParameters.bias);
<mask> }
<mask> }
<mask>
<mask> // Texture uniforms
<mask> if (scene.texturesEnabled) {
<mask> if (this._albedoTexture && StandardMaterial.DiffuseTextureEnabled) {
<mask> this._uniformBuffer.updateFloat2("vAlbedoInfos", this._albedoTexture.coordinatesIndex, this._albedoTexture.level);
<mask> this._uniformBuffer.updateMatrix("albedoMatrix", this._albedoTexture.getTextureMatrix());
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
defines.OPACITYFRESNEL = true;
}
</s> add if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> remove if (defines._areFresnelDirty) {
if (StandardMaterial.FresnelEnabled) {
// Fresnel
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
</s> add if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> remove }
</s> add </s> remove if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
defines.EMISSIVEFRESNEL = true;
}
</s> add defines.ALPHATESTVALUE = this._alphaCutOff;
defines.HDRLINEAROUTPUT = this._hdrLinearOutput;
defines.PREMULTIPLYALPHA = this._premultiplyAlpha;
defines.ALPHABLEND = this.needAlphaBlending();
defines.ALPHAFRESNEL = this._useAlphaFresnel;
</s> remove defines.LDROUTPUT = this._ldrOutput;
</s> add | [
"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/Materials/PBR/babylon.pbrBaseMaterial.ts | |
this._uniformBuffer.updateColor4("vReflectivityColor", this._reflectivityColor, this._microSurface);
| <mask> PBRMaterial._scaledReflectivity.g = (this._roughness === undefined || this._roughness === null) ? 1 : this._roughness;
<mask> this._uniformBuffer.updateColor4("vReflectivityColor", PBRMaterial._scaledReflectivity, 0);
<mask> }
<mask> else {
<mask> // GAMMA CORRECTION.
<mask> this.convertColorToLinearSpaceToRef(this._reflectivityColor, PBRMaterial._scaledReflectivity);
<mask> this._uniformBuffer.updateColor4("vReflectivityColor", PBRMaterial._scaledReflectivity, this._microSurface);
<mask> }
<mask>
<mask> // GAMMA CORRECTION.
<mask> this.convertColorToLinearSpaceToRef(this._emissiveColor, PBRMaterial._scaledEmissive);
<mask> this._uniformBuffer.updateColor3("vEmissiveColor", PBRMaterial._scaledEmissive);
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove // GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(this._emissiveColor, PBRMaterial._scaledEmissive);
this._uniformBuffer.updateColor3("vEmissiveColor", PBRMaterial._scaledEmissive);
// GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(this._reflectionColor, PBRMaterial._scaledReflection);
this._uniformBuffer.updateColor3("vReflectionColor", PBRMaterial._scaledReflection);
// GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(this._albedoColor, PBRMaterial._scaledAlbedo);
this._uniformBuffer.updateColor4("vAlbedoColor", PBRMaterial._scaledAlbedo, this.alpha * mesh.visibility);
</s> add this._uniformBuffer.updateColor3("vEmissiveColor", this._emissiveColor);
this._uniformBuffer.updateColor3("vReflectionColor", this._reflectionColor);
this._uniformBuffer.updateColor4("vAlbedoColor", this._albedoColor, this.alpha * mesh.visibility);
</s> remove private static _scaledEmissive = new Color3();
private static _scaledReflection = new Color3();
public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, useScalarInLinearSpace: boolean, maxSimultaneousLights: number, usePhysicalLightFalloff: boolean) {
var lightIndex = 0;
for (var light of mesh._lightSources) {
let useUbo = light._uniformBuffer.useUbo;
let scaledIntensity = light.getScaledIntensity();
light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
MaterialHelper.BindLightProperties(light, effect, lightIndex);
// GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(light.diffuse, PBRMaterial._scaledAlbedo, useScalarInLinearSpace);
PBRMaterial._scaledAlbedo.scaleToRef(scaledIntensity, PBRMaterial._scaledAlbedo);
light._uniformBuffer.updateColor4(useUbo ? "vLightDiffuse" : "vLightDiffuse" + lightIndex, PBRMaterial._scaledAlbedo, usePhysicalLightFalloff ? light.radius : light.range);
if (defines["SPECULARTERM"]) {
this.convertColorToLinearSpaceToRef(light.specular, PBRMaterial._scaledReflectivity, useScalarInLinearSpace);
PBRMaterial._scaledReflectivity.scaleToRef(scaledIntensity, PBRMaterial._scaledReflectivity);
light._uniformBuffer.updateColor3(useUbo ? "vLightSpecular" : "vLightSpecular" + lightIndex, PBRMaterial._scaledReflectivity);
}
// Shadows
if (scene.shadowsEnabled) {
MaterialHelper.BindLightShadow(light, scene, mesh, lightIndex + "", effect);
}
light._uniformBuffer.update();
lightIndex++;
if (lightIndex === maxSimultaneousLights)
break;
}
}
</s> add </s> remove if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
}
</s> add if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
</s> remove if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> add if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> remove defines.ALPHATESTVALUE = this._alphaCutOff;
defines.ALPHABLEND = this.needAlphaBlending();
</s> add if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
this._uniformBuffer.updateColor3("vEmissiveColor", this._emissiveColor);
this._uniformBuffer.updateColor3("vReflectionColor", this._reflectionColor);
this._uniformBuffer.updateColor4("vAlbedoColor", this._albedoColor, this.alpha * mesh.visibility);
| <mask> this.convertColorToLinearSpaceToRef(this._reflectivityColor, PBRMaterial._scaledReflectivity);
<mask> this._uniformBuffer.updateColor4("vReflectivityColor", PBRMaterial._scaledReflectivity, this._microSurface);
<mask> }
<mask>
<mask> // GAMMA CORRECTION.
<mask> this.convertColorToLinearSpaceToRef(this._emissiveColor, PBRMaterial._scaledEmissive);
<mask> this._uniformBuffer.updateColor3("vEmissiveColor", PBRMaterial._scaledEmissive);
<mask>
<mask> // GAMMA CORRECTION.
<mask> this.convertColorToLinearSpaceToRef(this._reflectionColor, PBRMaterial._scaledReflection);
<mask> this._uniformBuffer.updateColor3("vReflectionColor", PBRMaterial._scaledReflection);
<mask>
<mask> // GAMMA CORRECTION.
<mask> this.convertColorToLinearSpaceToRef(this._albedoColor, PBRMaterial._scaledAlbedo);
<mask> this._uniformBuffer.updateColor4("vAlbedoColor", PBRMaterial._scaledAlbedo, this.alpha * mesh.visibility);
<mask>
<mask>
<mask> // Misc
<mask> this._lightingInfos.x = this._directIntensity;
<mask> this._lightingInfos.y = this._emissiveIntensity;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove // GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(this._reflectivityColor, PBRMaterial._scaledReflectivity);
this._uniformBuffer.updateColor4("vReflectivityColor", PBRMaterial._scaledReflectivity, this._microSurface);
</s> add this._uniformBuffer.updateColor4("vReflectivityColor", this._reflectivityColor, this._microSurface);
</s> remove private static _scaledEmissive = new Color3();
private static _scaledReflection = new Color3();
public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, useScalarInLinearSpace: boolean, maxSimultaneousLights: number, usePhysicalLightFalloff: boolean) {
var lightIndex = 0;
for (var light of mesh._lightSources) {
let useUbo = light._uniformBuffer.useUbo;
let scaledIntensity = light.getScaledIntensity();
light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
MaterialHelper.BindLightProperties(light, effect, lightIndex);
// GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(light.diffuse, PBRMaterial._scaledAlbedo, useScalarInLinearSpace);
PBRMaterial._scaledAlbedo.scaleToRef(scaledIntensity, PBRMaterial._scaledAlbedo);
light._uniformBuffer.updateColor4(useUbo ? "vLightDiffuse" : "vLightDiffuse" + lightIndex, PBRMaterial._scaledAlbedo, usePhysicalLightFalloff ? light.radius : light.range);
if (defines["SPECULARTERM"]) {
this.convertColorToLinearSpaceToRef(light.specular, PBRMaterial._scaledReflectivity, useScalarInLinearSpace);
PBRMaterial._scaledReflectivity.scaleToRef(scaledIntensity, PBRMaterial._scaledReflectivity);
light._uniformBuffer.updateColor3(useUbo ? "vLightSpecular" : "vLightSpecular" + lightIndex, PBRMaterial._scaledReflectivity);
}
// Shadows
if (scene.shadowsEnabled) {
MaterialHelper.BindLightShadow(light, scene, mesh, lightIndex + "", effect);
}
light._uniformBuffer.update();
lightIndex++;
if (lightIndex === maxSimultaneousLights)
break;
}
}
</s> add </s> remove let aspectRatio = this.aspectRatio;
// Color
if (this._colorCurvesEnabled) {
ColorCurves.Bind(this.colorCurves, effect);
}
if (this._vignetteEnabled) {
// Vignette
let vignetteScaleY = Math.tan(this.cameraFov * 0.5);
let vignetteScaleX = vignetteScaleY * aspectRatio;
let vignetteScaleGeometricMean = Math.sqrt(vignetteScaleX * vignetteScaleY);
vignetteScaleX = Tools.Mix(vignetteScaleX, vignetteScaleGeometricMean, this.vignetteStretch);
vignetteScaleY = Tools.Mix(vignetteScaleY, vignetteScaleGeometricMean, this.vignetteStretch);
effect.setFloat4('vignetteSettings1', vignetteScaleX, vignetteScaleY, -vignetteScaleX * this.vignetteCentreX, -vignetteScaleY * this.vignetteCentreY);
let vignettePower = -2.0 * this.vignetteWeight;
effect.setFloat4('vignetteSettings2', this.vignetteColor.r, this.vignetteColor.g, this.vignetteColor.b, vignettePower);
}
// Contrast and exposure
effect.setFloat('contrast', this.cameraContrast);
effect.setFloat('cameraExposureLinear', Math.pow(2.0, -this.cameraExposure) * Math.PI);
// Color transform settings
if (this._colorGradingTexture) {
effect.setTexture('txColorTransform', this.colorGradingTexture);
let textureSize = this.colorGradingTexture.getSize().height;
effect.setFloat4("colorTransformSettings",
(textureSize - 1) / textureSize, // textureScale
0.5 / textureSize, // textureOffset
textureSize, // textureSize
this.colorGradingWeight // weight
);
}
</s> add this.imageProcessingConfiguration.bind(effect, this.aspectRatio);
</s> remove
#ifdef TONEMAPPING
float tonemappingCalibration = 1.590579;
result.rgb = 1.0 - exp2(-tonemappingCalibration * result.rgb);
#endif
// Going back to gamma space
result.rgb = pow(result.rgb, vec3(GammaEncodePowerApprox));
result.rgb = clamp(result.rgb, 0.0, 1.0);
// Contrast
vec3 resultHighContrast = applyEaseInOut(result.rgb);
if (contrast < 1.0) {
result.rgb = mix(vec3(0.5, 0.5, 0.5), result.rgb, contrast);
} else {
result.rgb = mix(result.rgb, resultHighContrast, contrast - 1.0);
}
// Apply Color Transform
#ifdef COLORGRADING
vec3 colorTransformInput = result.rgb * colorTransformSettings.xxx + colorTransformSettings.yyy;
vec3 colorTransformOutput = sampleTexture3D(txColorTransform, colorTransformInput).rgb;
result.rgb = mix(result.rgb, colorTransformOutput, colorTransformSettings.www);
#endif
#ifdef COLORCURVES
// Apply Color Curves
float luma = dot(result.rgb, RGBLuminanceCoefficients);
vec2 curveMix = clamp(vec2(luma * 3.0 - 1.5, luma * -3.0 + 1.5), vec2(0.0), vec2(1.0));
vec4 colorCurve = vCameraColorCurveNeutral + curveMix.x * vCameraColorCurvePositive - curveMix.y * vCameraColorCurveNegative;
result.rgb *= colorCurve.rgb;
result.rgb = mix(vec3(luma), result.rgb, colorCurve.a);
#endif
return result;
}
void main(void)
{
vec4 result = texture2D(textureSampler, vUV);
vec2 viewportXY = vUV * 2.0 - 1.0;
result = applyImageProcessing(result, viewportXY);
</s> add </s> remove vec3 toLinearSpace(vec3 color)
{
return vec3(pow(color.r, 2.2), pow(color.g, 2.2), pow(color.b, 2.2));
}
vec3 toGammaSpace(vec3 color)
{
return vec3(pow(color.r, 1.0 / 2.2), pow(color.g, 1.0 / 2.2), pow(color.b, 1.0 / 2.2));
}
#ifdef CAMERATONEMAP
vec3 toneMaps(vec3 color)
{
color = max(color, 0.0);
// TONE MAPPING / EXPOSURE
color.rgb = color.rgb * vCameraInfos.x;
float tuning = 1.5; // TODO: sync up so e.g. 18% greys are matched to exposure appropriately
// PI Test
// tuning *= kPi;
vec3 tonemapped = 1.0 - exp2(-color.rgb * tuning); // simple local photographic tonemapper
color.rgb = mix(color.rgb, tonemapped, 1.0);
return color;
}
#endif
#ifdef CAMERACONTRAST
vec4 contrasts(vec4 color)
{
color = clamp(color, 0.0, 1.0);
vec3 resultHighContrast = color.rgb * color.rgb * (3.0 - 2.0 * color.rgb);
float contrast = vCameraInfos.y;
if (contrast < 1.0)
{
// Decrease contrast: interpolate towards zero-contrast image (flat grey)
color.rgb = mix(vec3(0.5, 0.5, 0.5), color.rgb, contrast);
}
else
{
// Increase contrast: apply simple shoulder-toe high contrast curve
color.rgb = mix(color.rgb, resultHighContrast, contrast - 1.0);
}
return color;
}
#endif </s> add | [
"keep",
"keep",
"keep",
"keep",
"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/Materials/PBR/babylon.pbrBaseMaterial.ts |
<mask> } else {
<mask> this._uniformBuffer.setTexture("refraction2DSampler", this._refractionTexture);
<mask> }
<mask> }
<mask>
<mask> if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
<mask> ColorGradingTexture.Bind(this._cameraColorGradingTexture, this._activeEffect);
<mask> }
<mask> }
<mask>
<mask> // Clip plane
<mask> MaterialHelper.BindClipPlane(this._activeEffect, scene);
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, effect);
}
</s> add </s> remove if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Camera Color Grading can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
} else {
defines.CAMERACOLORGRADING = true;
}
} else {
defines.CAMERACOLORGRADING = false;
}
</s> add </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add </s> remove this._cameraInfos.x = this._cameraExposure;
this._cameraInfos.y = this._cameraContrast;
effect.setVector4("vCameraInfos", this._cameraInfos);
if (this._cameraColorCurves) {
ColorCurves.Bind(this._cameraColorCurves, this._activeEffect);
</s> add // image processing
if (this._imageProcessingConfiguration) {
this._imageProcessingConfiguration.bind(this._activeEffect);
</s> remove
if (this._cameraColorGradingTexture && this._cameraColorGradingTexture.animations && this._cameraColorGradingTexture.animations.length > 0) {
results.push(this._cameraColorGradingTexture);
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
MaterialHelper.BindLights(scene, mesh, this._activeEffect, defines, this._maxSimultaneousLights, this._usePhysicalLightFalloff);
| <mask>
<mask> if (this._mustRebind(scene, effect) || !this.isFrozen) {
<mask> // Lights
<mask> if (scene.lightsEnabled && !this._disableLighting) {
<mask> PBRMaterial.BindLights(scene, mesh, this._activeEffect, defines, this._useScalarInLinearSpace, this._maxSimultaneousLights, this._usePhysicalLightFalloff);
<mask> }
<mask>
<mask> // View
<mask> if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE || reflectionTexture) {
<mask> this.bindView(effect);
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (defines._areFresnelDirty) {
if (StandardMaterial.FresnelEnabled) {
// Fresnel
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled ||
this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
</s> add if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> remove defines.ALPHATESTVALUE = this._alphaCutOff;
defines.ALPHABLEND = this.needAlphaBlending();
</s> add if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
</s> remove if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
}
</s> add if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
</s> remove if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> add if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> remove // Fresnel
if (StandardMaterial.FresnelEnabled) {
if (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled) {
this._uniformBuffer.updateColor4("opacityParts", new Color3(this._opacityFresnelParameters.leftColor.toLuminance(), this._opacityFresnelParameters.rightColor.toLuminance(), this._opacityFresnelParameters.bias), this._opacityFresnelParameters.power);
}
if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
this._uniformBuffer.updateColor4("emissiveLeftColor", this._emissiveFresnelParameters.leftColor, this._emissiveFresnelParameters.power);
this._uniformBuffer.updateColor4("emissiveRightColor", this._emissiveFresnelParameters.rightColor, this._emissiveFresnelParameters.bias);
}
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
// image processing
if (this._imageProcessingConfiguration) {
this._imageProcessingConfiguration.bind(this._activeEffect);
| <mask> if (defines.NUM_MORPH_INFLUENCERS) {
<mask> MaterialHelper.BindMorphTargetParameters(mesh, this._activeEffect);
<mask> }
<mask>
<mask> this._cameraInfos.x = this._cameraExposure;
<mask> this._cameraInfos.y = this._cameraContrast;
<mask> effect.setVector4("vCameraInfos", this._cameraInfos);
<mask>
<mask> if (this._cameraColorCurves) {
<mask> ColorCurves.Bind(this._cameraColorCurves, this._activeEffect);
<mask> }
<mask>
<mask> // Log. depth
<mask> MaterialHelper.BindLogDepth(defines, this._activeEffect, scene);
<mask> }
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove // Color Curves
if (this._cameraColorCurves) {
ColorCurves.Bind(this._cameraColorCurves, effect);
</s> add // image processing
if (this.imageProcessingConfiguration) {
this.imageProcessingConfiguration.bind(this._activeEffect);
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, this._activeEffect);
}
</s> add </s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
</s> remove this._useEmissiveAsIllumination = true;
</s> add </s> remove if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Camera Color Grading can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
} else {
defines.CAMERACOLORGRADING = true;
}
} else {
defines.CAMERACOLORGRADING = false;
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
<mask>
<mask> if (this._refractionTexture && this._refractionTexture.animations && this._refractionTexture.animations.length > 0) {
<mask> results.push(this._refractionTexture);
<mask> }
<mask>
<mask> if (this._cameraColorGradingTexture && this._cameraColorGradingTexture.animations && this._cameraColorGradingTexture.animations.length > 0) {
<mask> results.push(this._cameraColorGradingTexture);
<mask> }
<mask>
<mask> return results;
<mask> }
<mask>
<mask> public dispose(forceDisposeEffect?: boolean, forceDisposeTextures?: boolean): void {
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
if (this._cameraColorGradingTexture && this._cameraColorGradingTexture.animations && this._cameraColorGradingTexture.animations.length > 0) {
results.push(this._cameraColorGradingTexture);
}
</s> add </s> remove if (defines.OPACITYFRESNEL) {
fallbacks.addFallback(1, "OPACITYFRESNEL");
}
if (defines.EMISSIVEFRESNEL) {
fallbacks.addFallback(2, "EMISSIVEFRESNEL");
}
if (defines.FRESNEL) {
fallbacks.addFallback(3, "FRESNEL");
}
</s> add </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add </s> remove if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Camera Color Grading can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
} else {
defines.CAMERACOLORGRADING = true;
}
} else {
defines.CAMERACOLORGRADING = false;
}
</s> add </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, this._activeEffect);
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
<mask>
<mask> if (this._refractionTexture) {
<mask> this._refractionTexture.dispose();
<mask> }
<mask>
<mask> if (this._cameraColorGradingTexture) {
<mask> this._cameraColorGradingTexture.dispose();
<mask> }
<mask> }
<mask>
<mask> this._renderTargets.dispose();
<mask>
<mask> super.dispose(forceDisposeEffect, forceDisposeTextures);
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
if (this._cameraColorGradingTexture) {
this._cameraColorGradingTexture.dispose();
}
</s> add }
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
</s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
</s> remove if (defines.OPACITYFRESNEL) {
fallbacks.addFallback(1, "OPACITYFRESNEL");
}
if (defines.EMISSIVEFRESNEL) {
fallbacks.addFallback(2, "EMISSIVEFRESNEL");
}
if (defines.FRESNEL) {
fallbacks.addFallback(3, "FRESNEL");
}
</s> add </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts | |
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
| <mask> this._renderTargets.dispose();
<mask>
<mask> super.dispose(forceDisposeEffect, forceDisposeTextures);
<mask> }
<mask> }
<mask> } </s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
if (this._cameraColorGradingTexture) {
this._cameraColorGradingTexture.dispose();
}
</s> add </s> remove
if (this._cameraColorGradingTexture) {
this._cameraColorGradingTexture.dispose();
}
</s> add }
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, this._activeEffect);
}
</s> add </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, effect);
}
</s> add </s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
| [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseMaterial.ts |
<mask> */
<mask> constructor(name: string, scene: Scene) {
<mask> super(name, scene);
<mask>
<mask> this._useEmissiveAsIllumination = true;
<mask> this._useAmbientInGrayScale = true;
<mask> this._useScalarInLinearSpace = true;
<mask> }
<mask> }
<mask> } </s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove this._useScalarInLinearSpace = true;
</s> add </s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add </s> remove if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
defines.EMISSIVEFRESNEL = true;
}
</s> add defines.ALPHATESTVALUE = this._alphaCutOff;
defines.HDRLINEAROUTPUT = this._hdrLinearOutput;
defines.PREMULTIPLYALPHA = this._premultiplyAlpha;
defines.ALPHABLEND = this.needAlphaBlending();
defines.ALPHAFRESNEL = this._useAlphaFresnel;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseSimpleMaterial.ts | |
<mask> super(name, scene);
<mask>
<mask> this._useEmissiveAsIllumination = true;
<mask> this._useAmbientInGrayScale = true;
<mask> this._useScalarInLinearSpace = true;
<mask> }
<mask> }
<mask> } </s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove this._useEmissiveAsIllumination = true;
</s> add </s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
</s> remove if (this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled) {
defines.EMISSIVEFRESNEL = true;
}
</s> add defines.ALPHATESTVALUE = this._alphaCutOff;
defines.HDRLINEAROUTPUT = this._hdrLinearOutput;
defines.PREMULTIPLYALPHA = this._premultiplyAlpha;
defines.ALPHABLEND = this.needAlphaBlending();
defines.ALPHAFRESNEL = this._useAlphaFresnel;
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add </s> remove if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
}
</s> add if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrBaseSimpleMaterial.ts | |
<mask> @serialize()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public disableBumpMap: boolean = false;
<mask>
<mask> /**
<mask> * The camera exposure used on this material.
<mask> * This property is here and not in the camera to allow controlling exposure without full screen post process.
<mask> * This corresponds to a photographic exposure.
<mask> */
<mask> @serialize()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public cameraExposure: number = 1.0;
<mask>
<mask> /**
<mask> * The camera contrast used on this material.
<mask> * This property is here and not in the camera to allow controlling contrast without full screen post process.
<mask> */
<mask> @serialize()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public cameraContrast: number = 1.0;
<mask>
<mask> /**
<mask> * Color Grading 2D Lookup Texture.
<mask> * This allows special effects like sepia, black and white to sixties rendering style.
<mask> */
<mask> @serializeAsTexture()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public cameraColorGradingTexture: BaseTexture = null;
<mask>
<mask> /**
<mask> * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
<mask> * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
<mask> * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
<mask> * corresponding to low luminance, medium luminance, and high luminance areas respectively.
<mask> */
<mask> @serializeAsColorCurves()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public cameraColorCurves: ColorCurves = null;
<mask>
<mask> /**
<mask> * AKA Diffuse Texture in standard nomenclature.
<mask> */
<mask> @serializeAsTexture()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
protected _cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
protected _cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
protected _cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
protected _cameraColorCurves: ColorCurves = null;
private _cameraInfos: Vector4 = new Vector4(1.0, 1.0, 0.0, 0.0);
private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
</s> add </s> remove @serializeAsColorCurves("cameraColorCurves")
private _cameraColorCurves: ColorCurves = null;
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves;
</s> add public get cameraColorCurves(): ColorCurves {
return this._imageProcessingConfiguration.colorCurves;
}
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
public set cameraColorCurves(value: ColorCurves) {
this._imageProcessingConfiguration.colorCurves = value;
}
</s> remove @serializeAsTexture("cameraColorGradingTexture")
private _cameraColorGradingTexture: BaseTexture;
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture;
</s> add protected _imageProcessingConfiguration: ImageProcessing;
/**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
/**
* Sets the Default image processing configuration used either in the this material.
*
* If sets to null, the scene one is in use.
*/
public set imageProcessingConfiguration(value: ImageProcessing) {
this._attachImageProcessingConfiguration(value);
}
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the Standard Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
/**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
}
/**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
/**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
/**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
}
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public get cameraExposure(): number {
return this._imageProcessingConfiguration.cameraExposure;
};
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public set cameraExposure(value: number) {
this._imageProcessingConfiguration.cameraExposure = value;
};
/**
* Gets The camera contrast used on this material.
*/
public get cameraContrast(): number {
return this._imageProcessingConfiguration.cameraContrast;
}
/**
* Sets The camera contrast used on this material.
*/
public set cameraContrast(value: number) {
this._imageProcessingConfiguration.cameraContrast = value;
}
/**
* Gets the Color Grading 2D Lookup Texture.
*/
public get cameraColorGradingTexture(): BaseTexture {
return this._imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets the Color Grading 2D Lookup Texture.
*/
public set cameraColorGradingTexture(value: BaseTexture) {
this._imageProcessingConfiguration.colorGradingTexture = value;
}
</s> remove * Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
</s> add * Default configuration related to image processing available in the standard Material.
</s> remove /**
* Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
* the creation of the material.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public useScalarInLinearSpace = false;
</s> add | [
"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/Materials/PBR/babylon.pbrMaterial.ts | |
<mask> @serialize()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public invertRefractionY = false;
<mask>
<mask> @serializeAsFresnelParameters()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public opacityFresnelParameters: FresnelParameters;
<mask>
<mask> @serializeAsFresnelParameters()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public emissiveFresnelParameters: FresnelParameters;
<mask>
<mask> /**
<mask> * This parameters will make the material used its opacity to control how much it is refracting aginst not.
<mask> * Materials half opaque for instance using refraction could benefit from this control.
<mask> */
<mask> @serialize()
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove protected _opacityFresnelParameters: FresnelParameters;
protected _emissiveFresnelParameters: FresnelParameters;
</s> add </s> remove /**
* In this mode, the emissive informtaion will always be added to the lighting once.
* A light for instance can be thought as emissive.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public useEmissiveAsIllumination = false;
</s> add </s> remove /**
* Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
* the creation of the material.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public useScalarInLinearSpace = false;
</s> add </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
@serializeAsTexture()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
@serializeAsColorCurves()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves = null;
</s> add </s> remove * Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
</s> add * Default configuration related to image processing available in the standard Material.
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrMaterial.ts | |
<mask> @serialize()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public useLightmapAsShadowmap = false;
<mask>
<mask> /**
<mask> * In this mode, the emissive informtaion will always be added to the lighting once.
<mask> * A light for instance can be thought as emissive.
<mask> */
<mask> @serialize()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public useEmissiveAsIllumination = false;
<mask>
<mask> /**
<mask> * Secifies that the alpha is coming form the albedo channel alpha channel.
<mask> */
<mask> @serialize()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove /**
* In this mode, the emissive informtaion will always be added to the lighting once.
* A light for instance can be thought as emissive.
*/
protected _useEmissiveAsIllumination = false;
</s> add </s> remove @serializeAsFresnelParameters()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public opacityFresnelParameters: FresnelParameters;
@serializeAsFresnelParameters()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public emissiveFresnelParameters: FresnelParameters;
</s> add </s> remove /**
* Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
* the creation of the material.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public useScalarInLinearSpace = false;
</s> add </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
@serializeAsTexture()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
@serializeAsColorCurves()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves = null;
</s> add </s> remove * If false, it allows the output of the shader to be in hdr space (e.g. more than one) which is useful
* in combination of post process in float or half float mode.
</s> add * Secifies that the alpha is premultiplied before output (this enables alpha premultiplied blending).
* in your scene composition.
*/
protected _premultiplyAlpha = false;
/**
* A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
* And/Or ocllude the blended part.
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrMaterial.ts | |
<mask> @serialize()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public useAutoMicroSurfaceFromReflectivityMap = false;
<mask>
<mask> /**
<mask> * Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
<mask> * the creation of the material.
<mask> */
<mask> @serialize()
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public useScalarInLinearSpace = false;
<mask>
<mask> /**
<mask> * BJS is using an harcoded light falloff based on a manually sets up range.
<mask> * In PBR, one way to represents the fallof is to use the inverse squared root algorythm.
<mask> * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.
<mask> */
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove /**
* Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
* the creation of the material.
*/
protected _useScalarInLinearSpace = false;
</s> add </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
@serializeAsTexture()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
@serializeAsColorCurves()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves = null;
</s> add </s> remove /**
* In this mode, the emissive informtaion will always be added to the lighting once.
* A light for instance can be thought as emissive.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public useEmissiveAsIllumination = false;
</s> add </s> remove @serializeAsFresnelParameters()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public opacityFresnelParameters: FresnelParameters;
@serializeAsFresnelParameters()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public emissiveFresnelParameters: FresnelParameters;
</s> add </s> remove @serializeAsTexture("cameraColorGradingTexture")
private _cameraColorGradingTexture: BaseTexture;
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture;
</s> add protected _imageProcessingConfiguration: ImageProcessing;
/**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
/**
* Sets the Default image processing configuration used either in the this material.
*
* If sets to null, the scene one is in use.
*/
public set imageProcessingConfiguration(value: ImageProcessing) {
this._attachImageProcessingConfiguration(value);
}
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the Standard Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
/**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
}
/**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
/**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
/**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
}
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public get cameraExposure(): number {
return this._imageProcessingConfiguration.cameraExposure;
};
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public set cameraExposure(value: number) {
this._imageProcessingConfiguration.cameraExposure = value;
};
/**
* Gets The camera contrast used on this material.
*/
public get cameraContrast(): number {
return this._imageProcessingConfiguration.cameraContrast;
}
/**
* Sets The camera contrast used on this material.
*/
public set cameraContrast(value: number) {
this._imageProcessingConfiguration.cameraContrast = value;
}
/**
* Gets the Color Grading 2D Lookup Texture.
*/
public get cameraColorGradingTexture(): BaseTexture {
return this._imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets the Color Grading 2D Lookup Texture.
*/
public set cameraColorGradingTexture(value: BaseTexture) {
this._imageProcessingConfiguration.colorGradingTexture = value;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/PBR/babylon.pbrMaterial.ts | |
<mask> this.loadTexture();
<mask> }
<mask> }
<mask>
<mask> /**
<mask> * Binds the color grading to the shader.
<mask> * @param colorGrading The texture to bind
<mask> * @param effect The effect to bind to
<mask> */
<mask> public static Bind(colorGrading: BaseTexture, effect: Effect) : void {
<mask> effect.setTexture("cameraColorGrading2DSampler", colorGrading);
<mask>
<mask> let x = colorGrading.level; // Texture Level
<mask> let y = colorGrading.getSize().height; // Texture Size example with 8
<mask> let z = y - 1.0; // SizeMinusOne 8 - 1
<mask> let w = 1 / y; // Space of 1 slice 1 / 8
<mask>
<mask> effect.setFloat4("vCameraColorGradingInfos", x, y, z, w);
<mask>
<mask> let slicePixelSizeU = w / y; // Space of 1 pixel in U direction, e.g. 1/64
<mask> let slicePixelSizeV = w; // Space of 1 pixel in V direction, e.g. 1/8 // Space of 1 pixel in V direction, e.g. 1/8
<mask>
<mask> let x2 = z * slicePixelSizeU; // Extent of lookup range in U for a single slice so that range corresponds to (size-1) texels, for example 7/64
<mask> let y2 = z / y; // Extent of lookup range in V for a single slice so that range corresponds to (size-1) texels, for example 7/8
<mask> let z2 = 0.5 * slicePixelSizeU; // Offset of lookup range in U to align sample position with texel centre, for example 0.5/64
<mask> let w2 = 0.5 * slicePixelSizeV; // Offset of lookup range in V to align sample position with texel centre, for example 0.5/8
<mask>
<mask> effect.setFloat4("vCameraColorGradingScaleOffset", x2, y2, z2, w2);
<mask> }
<mask>
<mask> /**
<mask> * Prepare the list of uniforms associated with the ColorGrading effects.
<mask> * @param uniformsList The list of uniforms used in the effect
<mask> * @param samplersList The list of samplers used in the effect
<mask> */
<mask> public static PrepareUniformsAndSamplers(uniformsList: string[], samplersList: string[]): void {
<mask> uniformsList.push(
<mask> "vCameraColorGradingInfos",
<mask> "vCameraColorGradingScaleOffset"
<mask> );
<mask>
<mask> samplersList.push(
<mask> "cameraColorGrading2DSampler"
<mask> );
<mask> }
<mask>
<mask> /**
<mask> * Parses a color grading texture serialized by Babylon.
<mask> * @param parsedTexture The texture information being parsedTexture
<mask> * @param scene The scene to load the texture in
<mask> * @param rootUrl The root url of the data assets to load
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove /**
* Polyfill for SAMPLE_TEXTURE_3D, which is unsupported in WebGL.
* colorTransformSettings.y = textureOffset (0.5 / textureSize).
* colorTransformSettings.z = textureSize.
*/
vec3 sampleTexture3D(sampler2D colorTransform, vec3 color)
</s> add void main(void)
</s> remove @serializeAsTexture("cameraColorGradingTexture")
private _cameraColorGradingTexture: BaseTexture;
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture;
</s> add protected _imageProcessingConfiguration: ImageProcessing;
/**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
/**
* Sets the Default image processing configuration used either in the this material.
*
* If sets to null, the scene one is in use.
*/
public set imageProcessingConfiguration(value: ImageProcessing) {
this._attachImageProcessingConfiguration(value);
}
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the Standard Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
/**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
}
/**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
/**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
/**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
}
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public get cameraExposure(): number {
return this._imageProcessingConfiguration.cameraExposure;
};
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public set cameraExposure(value: number) {
this._imageProcessingConfiguration.cameraExposure = value;
};
/**
* Gets The camera contrast used on this material.
*/
public get cameraContrast(): number {
return this._imageProcessingConfiguration.cameraContrast;
}
/**
* Sets The camera contrast used on this material.
*/
public set cameraContrast(value: number) {
this._imageProcessingConfiguration.cameraContrast = value;
}
/**
* Gets the Color Grading 2D Lookup Texture.
*/
public get cameraColorGradingTexture(): BaseTexture {
return this._imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets the Color Grading 2D Lookup Texture.
*/
public set cameraColorGradingTexture(value: BaseTexture) {
this._imageProcessingConfiguration.colorGradingTexture = value;
}
</s> remove /**
* Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
* the creation of the material.
*/
protected _useScalarInLinearSpace = false;
</s> add </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
@serializeAsTexture()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
@serializeAsColorCurves()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves = null;
</s> add </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
protected _cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
protected _cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
protected _cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
protected _cameraColorCurves: ColorCurves = null;
private _cameraInfos: Vector4 = new Vector4(1.0, 1.0, 0.0, 0.0);
private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
</s> add | [
"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/Materials/Textures/babylon.colorGradingTexture.ts | |
public getEngine(): Engine {
return this._engine;
}
| <mask> return this._isReady;
<mask> }
<mask>
<mask> public getProgram(): WebGLProgram {
<mask> return this._program;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public static get VIGNETTEMODE_OPAQUE(): number {
return ImageProcessingPostProcess._VIGNETTEMODE_OPAQUE;
</s> add this.updateEffect(defines, uniforms, samplers);
</s> remove public set vignetteEnabled(value: boolean) {
if (this._vignetteEnabled === value) {
return;
}
</s> add /**
* Gets Vignette centre X Offset.
*/
public get vignetteCentreX(): number {
return this.imageProcessingConfiguration.vignetteCentreX;
}
/**
* Sets Vignette centre X Offset.
*/
public set vignetteCentreX(value: number) {
this.imageProcessingConfiguration.vignetteCentreX = value;
}
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove public set colorCurvesEnabled(value: boolean) {
if (this._colorCurvesEnabled === value) {
return;
}
</s> add /**
* Gets Camera exposure used in the effect.
*/
public get cameraExposure(): number {
return this.imageProcessingConfiguration.cameraExposure;
}
/**
* Sets Camera exposure used in the effect.
*/
public set cameraExposure(value: number) {
this.imageProcessingConfiguration.cameraExposure = value;
}
</s> remove this._vignetteEnabled = value;
this._updateParameters();
}
</s> add /**
* Gets Vignette centre Y Offset.
*/
public get vignetteCentreY(): number {
return this.imageProcessingConfiguration.vignetteCentreY;
}
/**
* Sets Vignette centre Y Offset.
*/
public set vignetteCentreY(value: number) {
this.imageProcessingConfiguration.vignetteCentreY = value;
}
/**
* Gets Vignette weight or intensity of the vignette effect.
*/
public get vignetteWeight(): number {
return this.imageProcessingConfiguration.vignetteWeight;
}
/**
* Sets Vignette weight or intensity of the vignette effect.
*/
public set vignetteWeight(value: number) {
this.imageProcessingConfiguration.vignetteWeight = value;
}
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.effect.ts |
public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4, , usePhysicalLightFalloff = false) {
| <mask> public static BindLightProperties(light: Light, effect: Effect, lightIndex: number): void {
<mask> light.transferToEffect(effect, lightIndex + "");
<mask> }
<mask>
<mask> public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4) {
<mask> var lightIndex = 0;
<mask> for (var light of mesh._lightSources) {
<mask> light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
<mask>
<mask> MaterialHelper.BindLightProperties(light, effect, lightIndex);
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove private static _scaledEmissive = new Color3();
private static _scaledReflection = new Color3();
public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, useScalarInLinearSpace: boolean, maxSimultaneousLights: number, usePhysicalLightFalloff: boolean) {
var lightIndex = 0;
for (var light of mesh._lightSources) {
let useUbo = light._uniformBuffer.useUbo;
let scaledIntensity = light.getScaledIntensity();
light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
MaterialHelper.BindLightProperties(light, effect, lightIndex);
// GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(light.diffuse, PBRMaterial._scaledAlbedo, useScalarInLinearSpace);
PBRMaterial._scaledAlbedo.scaleToRef(scaledIntensity, PBRMaterial._scaledAlbedo);
light._uniformBuffer.updateColor4(useUbo ? "vLightDiffuse" : "vLightDiffuse" + lightIndex, PBRMaterial._scaledAlbedo, usePhysicalLightFalloff ? light.radius : light.range);
if (defines["SPECULARTERM"]) {
this.convertColorToLinearSpaceToRef(light.specular, PBRMaterial._scaledReflectivity, useScalarInLinearSpace);
PBRMaterial._scaledReflectivity.scaleToRef(scaledIntensity, PBRMaterial._scaledReflectivity);
light._uniformBuffer.updateColor3(useUbo ? "vLightSpecular" : "vLightSpecular" + lightIndex, PBRMaterial._scaledReflectivity);
}
// Shadows
if (scene.shadowsEnabled) {
MaterialHelper.BindLightShadow(light, scene, mesh, lightIndex + "", effect);
}
light._uniformBuffer.update();
lightIndex++;
if (lightIndex === maxSimultaneousLights)
break;
}
}
</s> add </s> remove light.diffuse.scaleToRef(light.intensity, Tmp.Color3[0]);
light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], light.range, lightIndex + "");
</s> add light.diffuse.scaleToRef(scaledIntensity, Tmp.Color3[0]);
light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], usePhysicalLightFalloff ? light.radius : light.range, lightIndex + "");
</s> remove private convertColorToLinearSpaceToRef(color: Color3, ref: Color3): void {
PBRMaterial.convertColorToLinearSpaceToRef(color, ref, this._useScalarInLinearSpace);
}
private static convertColorToLinearSpaceToRef(color: Color3, ref: Color3, useScalarInLinear: boolean): void {
if (!useScalarInLinear) {
color.toLinearSpaceToRef(ref);
} else {
ref.r = color.r;
ref.g = color.g;
ref.b = color.b;
}
}
private static _scaledAlbedo = new Color3();
</s> add </s> remove light.specular.scaleToRef(light.intensity, Tmp.Color3[1]);
</s> add light.specular.scaleToRef(scaledIntensity, Tmp.Color3[1]);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.materialHelper.ts |
let scaledIntensity = light.getScaledIntensity();
| <mask>
<mask> public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4, , usePhysicalLightFalloff = false) {
<mask> var lightIndex = 0;
<mask> for (var light of mesh._lightSources) {
<mask> light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
<mask>
<mask> MaterialHelper.BindLightProperties(light, effect, lightIndex);
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4) {
</s> add public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4, , usePhysicalLightFalloff = false) {
</s> remove private static _scaledEmissive = new Color3();
private static _scaledReflection = new Color3();
public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, useScalarInLinearSpace: boolean, maxSimultaneousLights: number, usePhysicalLightFalloff: boolean) {
var lightIndex = 0;
for (var light of mesh._lightSources) {
let useUbo = light._uniformBuffer.useUbo;
let scaledIntensity = light.getScaledIntensity();
light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
MaterialHelper.BindLightProperties(light, effect, lightIndex);
// GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(light.diffuse, PBRMaterial._scaledAlbedo, useScalarInLinearSpace);
PBRMaterial._scaledAlbedo.scaleToRef(scaledIntensity, PBRMaterial._scaledAlbedo);
light._uniformBuffer.updateColor4(useUbo ? "vLightDiffuse" : "vLightDiffuse" + lightIndex, PBRMaterial._scaledAlbedo, usePhysicalLightFalloff ? light.radius : light.range);
if (defines["SPECULARTERM"]) {
this.convertColorToLinearSpaceToRef(light.specular, PBRMaterial._scaledReflectivity, useScalarInLinearSpace);
PBRMaterial._scaledReflectivity.scaleToRef(scaledIntensity, PBRMaterial._scaledReflectivity);
light._uniformBuffer.updateColor3(useUbo ? "vLightSpecular" : "vLightSpecular" + lightIndex, PBRMaterial._scaledReflectivity);
}
// Shadows
if (scene.shadowsEnabled) {
MaterialHelper.BindLightShadow(light, scene, mesh, lightIndex + "", effect);
}
light._uniformBuffer.update();
lightIndex++;
if (lightIndex === maxSimultaneousLights)
break;
}
}
</s> add </s> remove light.diffuse.scaleToRef(light.intensity, Tmp.Color3[0]);
light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], light.range, lightIndex + "");
</s> add light.diffuse.scaleToRef(scaledIntensity, Tmp.Color3[0]);
light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], usePhysicalLightFalloff ? light.radius : light.range, lightIndex + "");
</s> remove private convertColorToLinearSpaceToRef(color: Color3, ref: Color3): void {
PBRMaterial.convertColorToLinearSpaceToRef(color, ref, this._useScalarInLinearSpace);
}
private static convertColorToLinearSpaceToRef(color: Color3, ref: Color3, useScalarInLinear: boolean): void {
if (!useScalarInLinear) {
color.toLinearSpaceToRef(ref);
} else {
ref.r = color.r;
ref.g = color.g;
ref.b = color.b;
}
}
private static _scaledAlbedo = new Color3();
</s> add </s> remove public static get VIGNETTEMODE_MULTIPLY(): number {
return ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY;
}
</s> add var uniforms = [];
ImageProcessing.PrepareUniforms(uniforms, this._defines);
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.materialHelper.ts |
light.diffuse.scaleToRef(scaledIntensity, Tmp.Color3[0]);
light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], usePhysicalLightFalloff ? light.radius : light.range, lightIndex + "");
| <mask> light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
<mask>
<mask> MaterialHelper.BindLightProperties(light, effect, lightIndex);
<mask>
<mask> light.diffuse.scaleToRef(light.intensity, Tmp.Color3[0]);
<mask> light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], light.range, lightIndex + "");
<mask> if (defines["SPECULARTERM"]) {
<mask> light.specular.scaleToRef(light.intensity, Tmp.Color3[1]);
<mask> light._uniformBuffer.updateColor3("vLightSpecular", Tmp.Color3[1], lightIndex + "");
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove light.specular.scaleToRef(light.intensity, Tmp.Color3[1]);
</s> add light.specular.scaleToRef(scaledIntensity, Tmp.Color3[1]);
</s> remove public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4) {
</s> add public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4, , usePhysicalLightFalloff = false) {
</s> remove private static _scaledEmissive = new Color3();
private static _scaledReflection = new Color3();
public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, useScalarInLinearSpace: boolean, maxSimultaneousLights: number, usePhysicalLightFalloff: boolean) {
var lightIndex = 0;
for (var light of mesh._lightSources) {
let useUbo = light._uniformBuffer.useUbo;
let scaledIntensity = light.getScaledIntensity();
light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
MaterialHelper.BindLightProperties(light, effect, lightIndex);
// GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(light.diffuse, PBRMaterial._scaledAlbedo, useScalarInLinearSpace);
PBRMaterial._scaledAlbedo.scaleToRef(scaledIntensity, PBRMaterial._scaledAlbedo);
light._uniformBuffer.updateColor4(useUbo ? "vLightDiffuse" : "vLightDiffuse" + lightIndex, PBRMaterial._scaledAlbedo, usePhysicalLightFalloff ? light.radius : light.range);
if (defines["SPECULARTERM"]) {
this.convertColorToLinearSpaceToRef(light.specular, PBRMaterial._scaledReflectivity, useScalarInLinearSpace);
PBRMaterial._scaledReflectivity.scaleToRef(scaledIntensity, PBRMaterial._scaledReflectivity);
light._uniformBuffer.updateColor3(useUbo ? "vLightSpecular" : "vLightSpecular" + lightIndex, PBRMaterial._scaledReflectivity);
}
// Shadows
if (scene.shadowsEnabled) {
MaterialHelper.BindLightShadow(light, scene, mesh, lightIndex + "", effect);
}
light._uniformBuffer.update();
lightIndex++;
if (lightIndex === maxSimultaneousLights)
break;
}
}
</s> add </s> remove float alphaG = Square(roughness) + kMinimumVariance;
</s> add float alphaG = square(roughness) + kMinimumVariance;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.materialHelper.ts |
light.specular.scaleToRef(scaledIntensity, Tmp.Color3[1]);
| <mask>
<mask> light.diffuse.scaleToRef(light.intensity, Tmp.Color3[0]);
<mask> light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], light.range, lightIndex + "");
<mask> if (defines["SPECULARTERM"]) {
<mask> light.specular.scaleToRef(light.intensity, Tmp.Color3[1]);
<mask> light._uniformBuffer.updateColor3("vLightSpecular", Tmp.Color3[1], lightIndex + "");
<mask> }
<mask>
<mask> // Shadows
<mask> if (scene.shadowsEnabled) {
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove light.diffuse.scaleToRef(light.intensity, Tmp.Color3[0]);
light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], light.range, lightIndex + "");
</s> add light.diffuse.scaleToRef(scaledIntensity, Tmp.Color3[0]);
light._uniformBuffer.updateColor4("vLightDiffuse", Tmp.Color3[0], usePhysicalLightFalloff ? light.radius : light.range, lightIndex + "");
</s> remove public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4) {
</s> add public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, maxSimultaneousLights = 4, , usePhysicalLightFalloff = false) {
</s> remove private static _scaledEmissive = new Color3();
private static _scaledReflection = new Color3();
public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, useScalarInLinearSpace: boolean, maxSimultaneousLights: number, usePhysicalLightFalloff: boolean) {
var lightIndex = 0;
for (var light of mesh._lightSources) {
let useUbo = light._uniformBuffer.useUbo;
let scaledIntensity = light.getScaledIntensity();
light._uniformBuffer.bindToEffect(effect, "Light" + lightIndex);
MaterialHelper.BindLightProperties(light, effect, lightIndex);
// GAMMA CORRECTION.
this.convertColorToLinearSpaceToRef(light.diffuse, PBRMaterial._scaledAlbedo, useScalarInLinearSpace);
PBRMaterial._scaledAlbedo.scaleToRef(scaledIntensity, PBRMaterial._scaledAlbedo);
light._uniformBuffer.updateColor4(useUbo ? "vLightDiffuse" : "vLightDiffuse" + lightIndex, PBRMaterial._scaledAlbedo, usePhysicalLightFalloff ? light.radius : light.range);
if (defines["SPECULARTERM"]) {
this.convertColorToLinearSpaceToRef(light.specular, PBRMaterial._scaledReflectivity, useScalarInLinearSpace);
PBRMaterial._scaledReflectivity.scaleToRef(scaledIntensity, PBRMaterial._scaledReflectivity);
light._uniformBuffer.updateColor3(useUbo ? "vLightSpecular" : "vLightSpecular" + lightIndex, PBRMaterial._scaledReflectivity);
}
// Shadows
if (scene.shadowsEnabled) {
MaterialHelper.BindLightShadow(light, scene, mesh, lightIndex + "", effect);
}
light._uniformBuffer.update();
lightIndex++;
if (lightIndex === maxSimultaneousLights)
break;
}
}
</s> add </s> remove float alphaG = Square(roughness) + kMinimumVariance;
</s> add float alphaG = square(roughness) + kMinimumVariance;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.materialHelper.ts |
export class StandardMaterialDefines extends MaterialDefines implements IImageProcessingDefines {
| <mask> module BABYLON {
<mask> export class StandardMaterialDefines extends MaterialDefines {
<mask> public DIFFUSE = false;
<mask> public AMBIENT = false;
<mask> public OPACITY = false;
<mask> public OPACITYRGB = false;
<mask> public REFLECTION = false;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public LDROUTPUT = true;
</s> add public PREMULTIPLYALPHA = false;
public ALPHAFRESNEL = false;
public IMAGEPROCESSING = false;
public VIGNETTE = false;
public VIGNETTEBLENDMODEMULTIPLY = false;
public VIGNETTEBLENDMODEOPAQUE = false;
public TONEMAPPING = false;
public CONTRAST = false;
public COLORCURVES = false;
public COLORGRADING = false;
public HDRLINEAROUTPUT = false;
</s> remove public CAMERATONEMAP = false;
public CAMERACONTRAST = false;
public CAMERACOLORGRADING = false;
public CAMERACOLORCURVES = false;
</s> add </s> remove public OPACITYFRESNEL = false;
public EMISSIVEFRESNEL = false;
public FRESNEL = false;
</s> add </s> remove public CAMERACOLORGRADING = false;
public CAMERACOLORCURVES = false;
</s> add | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts |
<mask> public INVERTNORMALMAPX = false;
<mask> public INVERTNORMALMAPY = false;
<mask> public TWOSIDEDLIGHTING = false;
<mask> public SHADOWFLOAT = false;
<mask> public CAMERACOLORGRADING = false;
<mask> public CAMERACOLORCURVES = false;
<mask> public MORPHTARGETS = false;
<mask> public MORPHTARGETS_NORMAL = false;
<mask> public MORPHTARGETS_TANGENT = false;
<mask> public NUM_MORPH_INFLUENCERS = 0;
<mask> public USERIGHTHANDEDSYSTEM = false;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public LDROUTPUT = true;
</s> add public PREMULTIPLYALPHA = false;
public ALPHAFRESNEL = false;
public IMAGEPROCESSING = false;
public VIGNETTE = false;
public VIGNETTEBLENDMODEMULTIPLY = false;
public VIGNETTEBLENDMODEOPAQUE = false;
public TONEMAPPING = false;
public CONTRAST = false;
public COLORCURVES = false;
public COLORGRADING = false;
public HDRLINEAROUTPUT = false;
</s> remove public CAMERATONEMAP = false;
public CAMERACONTRAST = false;
public CAMERACOLORGRADING = false;
public CAMERACOLORCURVES = false;
</s> add </s> remove public EMISSIVEASILLUMINATION = false;
</s> add </s> remove public OPACITYFRESNEL = false;
public EMISSIVEFRESNEL = false;
public FRESNEL = false;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts | |
public IMAGEPROCESSING = false;
public VIGNETTE = false;
public VIGNETTEBLENDMODEMULTIPLY = false;
public VIGNETTEBLENDMODEOPAQUE = false;
public TONEMAPPING = false;
public CONTRAST = false;
public COLORCURVES = false;
public COLORGRADING = false;
| <mask> public NUM_MORPH_INFLUENCERS = 0;
<mask> public USERIGHTHANDEDSYSTEM = false;
<mask>
<mask> constructor() {
<mask> super();
<mask> this.rebuild();
<mask> }
<mask>
<mask> public setReflectionMode(modeToEnable: string) {
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public LDROUTPUT = true;
</s> add public PREMULTIPLYALPHA = false;
public ALPHAFRESNEL = false;
public IMAGEPROCESSING = false;
public VIGNETTE = false;
public VIGNETTEBLENDMODEMULTIPLY = false;
public VIGNETTEBLENDMODEOPAQUE = false;
public TONEMAPPING = false;
public CONTRAST = false;
public COLORCURVES = false;
public COLORGRADING = false;
public HDRLINEAROUTPUT = false;
</s> remove public CAMERACOLORGRADING = false;
public CAMERACOLORCURVES = false;
</s> add </s> remove public vignetteStretch = 0;
public vignetteCentreX = 0;
public vignetteCentreY = 0;
public vignetteWeight = 1.5;
public vignetteColor: BABYLON.Color4 = new BABYLON.Color4(0, 0, 0, 0);
private _vignetteBlendMode = ImageProcessingPostProcess.VIGNETTEMODE_MULTIPLY;
private _vignetteEnabled = true;
public cameraContrast = 1.0;
public cameraExposure = 1.68;
private _cameraToneMappingEnabled = true;
private _fromLinearSpace = false;
</s> add /**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
</s> remove public EMISSIVEASILLUMINATION = false;
</s> add </s> remove export class StandardMaterialDefines extends MaterialDefines {
</s> add export class StandardMaterialDefines extends MaterialDefines implements IImageProcessingDefines {
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts |
* Default configuration related to image processing available in the standard Material.
| <mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public twoSidedLighting: boolean;
<mask>
<mask> /**
<mask> * Color Grading 2D Lookup Texture.
<mask> * This allows special effects like sepia, black and white to sixties rendering style.
<mask> */
<mask> @serializeAsTexture("cameraColorGradingTexture")
<mask> private _cameraColorGradingTexture: BaseTexture;
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public cameraColorGradingTexture: BaseTexture;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
@serializeAsTexture()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
@serializeAsColorCurves()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves = null;
</s> add </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
protected _cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
protected _cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
protected _cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
protected _cameraColorCurves: ColorCurves = null;
private _cameraInfos: Vector4 = new Vector4(1.0, 1.0, 0.0, 0.0);
private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
</s> add </s> remove @serializeAsTexture("cameraColorGradingTexture")
private _cameraColorGradingTexture: BaseTexture;
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture;
</s> add protected _imageProcessingConfiguration: ImageProcessing;
/**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
/**
* Sets the Default image processing configuration used either in the this material.
*
* If sets to null, the scene one is in use.
*/
public set imageProcessingConfiguration(value: ImageProcessing) {
this._attachImageProcessingConfiguration(value);
}
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the Standard Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
/**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
}
/**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
/**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
/**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
}
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public get cameraExposure(): number {
return this._imageProcessingConfiguration.cameraExposure;
};
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public set cameraExposure(value: number) {
this._imageProcessingConfiguration.cameraExposure = value;
};
/**
* Gets The camera contrast used on this material.
*/
public get cameraContrast(): number {
return this._imageProcessingConfiguration.cameraContrast;
}
/**
* Sets The camera contrast used on this material.
*/
public set cameraContrast(value: number) {
this._imageProcessingConfiguration.cameraContrast = value;
}
/**
* Gets the Color Grading 2D Lookup Texture.
*/
public get cameraColorGradingTexture(): BaseTexture {
return this._imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets the Color Grading 2D Lookup Texture.
*/
public set cameraColorGradingTexture(value: BaseTexture) {
this._imageProcessingConfiguration.colorGradingTexture = value;
}
</s> remove @serializeAsFresnelParameters()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public opacityFresnelParameters: FresnelParameters;
@serializeAsFresnelParameters()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public emissiveFresnelParameters: FresnelParameters;
</s> add </s> remove /**
* Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
* the creation of the material.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public useScalarInLinearSpace = false;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts |
protected _imageProcessingConfiguration: ImageProcessing;
/**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
/**
* Sets the Default image processing configuration used either in the this material.
*
* If sets to null, the scene one is in use.
*/
public set imageProcessingConfiguration(value: ImageProcessing) {
this._attachImageProcessingConfiguration(value);
}
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the Standard Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
/**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
}
/**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
/**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
/**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
}
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public get cameraExposure(): number {
return this._imageProcessingConfiguration.cameraExposure;
};
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public set cameraExposure(value: number) {
this._imageProcessingConfiguration.cameraExposure = value;
};
/**
* Gets The camera contrast used on this material.
*/
public get cameraContrast(): number {
return this._imageProcessingConfiguration.cameraContrast;
}
/**
* Sets The camera contrast used on this material.
*/
public set cameraContrast(value: number) {
this._imageProcessingConfiguration.cameraContrast = value;
}
/**
* Gets the Color Grading 2D Lookup Texture.
*/
public get cameraColorGradingTexture(): BaseTexture {
return this._imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets the Color Grading 2D Lookup Texture.
*/
public set cameraColorGradingTexture(value: BaseTexture) {
this._imageProcessingConfiguration.colorGradingTexture = value;
}
| <mask> /**
<mask> * Color Grading 2D Lookup Texture.
<mask> * This allows special effects like sepia, black and white to sixties rendering style.
<mask> */
<mask> @serializeAsTexture("cameraColorGradingTexture")
<mask> private _cameraColorGradingTexture: BaseTexture;
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public cameraColorGradingTexture: BaseTexture;
<mask>
<mask> /**
<mask> * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
<mask> * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
<mask> * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove @serializeAsColorCurves("cameraColorCurves")
private _cameraColorCurves: ColorCurves = null;
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves;
</s> add public get cameraColorCurves(): ColorCurves {
return this._imageProcessingConfiguration.colorCurves;
}
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
public set cameraColorCurves(value: ColorCurves) {
this._imageProcessingConfiguration.colorCurves = value;
}
</s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
@serializeAsTexture()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
@serializeAsColorCurves()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves = null;
</s> add </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
protected _cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
protected _cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
protected _cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
protected _cameraColorCurves: ColorCurves = null;
private _cameraInfos: Vector4 = new Vector4(1.0, 1.0, 0.0, 0.0);
private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
</s> add </s> remove * Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
</s> add * Default configuration related to image processing available in the standard Material.
</s> remove * If false, it allows the output of the shader to be in hdr space (e.g. more than one) which is useful
* in combination of post process in float or half float mode.
</s> add * Secifies that the alpha is premultiplied before output (this enables alpha premultiplied blending).
* in your scene composition.
*/
protected _premultiplyAlpha = false;
/**
* A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
* And/Or ocllude the blended part.
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts |
public get cameraColorCurves(): ColorCurves {
return this._imageProcessingConfiguration.colorCurves;
}
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
public set cameraColorCurves(value: ColorCurves) {
this._imageProcessingConfiguration.colorCurves = value;
}
| <mask> * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
<mask> * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
<mask> * corresponding to low luminance, medium luminance, and high luminance areas respectively.
<mask> */
<mask> @serializeAsColorCurves("cameraColorCurves")
<mask> private _cameraColorCurves: ColorCurves = null;
<mask> @expandToProperty("_markAllSubMeshesAsTexturesDirty")
<mask> public cameraColorCurves: ColorCurves;
<mask>
<mask> public customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: StandardMaterialDefines) => string;
<mask>
<mask> protected _renderTargets = new SmartArray<RenderTargetTexture>(16);
<mask> protected _worldViewProjectionMatrix = Matrix.Zero();
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
@serialize()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
@serializeAsTexture()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
@serializeAsColorCurves()
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorCurves: ColorCurves = null;
</s> add </s> remove /**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
protected _cameraExposure: number = 1.0;
/**
* The camera contrast used on this material.
* This property is here and not in the camera to allow controlling contrast without full screen post process.
*/
protected _cameraContrast: number = 1.0;
/**
* Color Grading 2D Lookup Texture.
* This allows special effects like sepia, black and white to sixties rendering style.
*/
protected _cameraColorGradingTexture: BaseTexture = null;
/**
* The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
*/
protected _cameraColorCurves: ColorCurves = null;
private _cameraInfos: Vector4 = new Vector4(1.0, 1.0, 0.0, 0.0);
private _microsurfaceTextureLods: Vector2 = new Vector2(0.0, 0.0);
</s> add </s> remove @serializeAsTexture("cameraColorGradingTexture")
private _cameraColorGradingTexture: BaseTexture;
@expandToProperty("_markAllSubMeshesAsTexturesDirty")
public cameraColorGradingTexture: BaseTexture;
</s> add protected _imageProcessingConfiguration: ImageProcessing;
/**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
/**
* Sets the Default image processing configuration used either in the this material.
*
* If sets to null, the scene one is in use.
*/
public set imageProcessingConfiguration(value: ImageProcessing) {
this._attachImageProcessingConfiguration(value);
}
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the Standard Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
/**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
}
/**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
/**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
/**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
}
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public get cameraExposure(): number {
return this._imageProcessingConfiguration.cameraExposure;
};
/**
* The camera exposure used on this material.
* This property is here and not in the camera to allow controlling exposure without full screen post process.
* This corresponds to a photographic exposure.
*/
public set cameraExposure(value: number) {
this._imageProcessingConfiguration.cameraExposure = value;
};
/**
* Gets The camera contrast used on this material.
*/
public get cameraContrast(): number {
return this._imageProcessingConfiguration.cameraContrast;
}
/**
* Sets The camera contrast used on this material.
*/
public set cameraContrast(value: number) {
this._imageProcessingConfiguration.cameraContrast = value;
}
/**
* Gets the Color Grading 2D Lookup Texture.
*/
public get cameraColorGradingTexture(): BaseTexture {
return this._imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets the Color Grading 2D Lookup Texture.
*/
public set cameraColorGradingTexture(value: BaseTexture) {
this._imageProcessingConfiguration.colorGradingTexture = value;
}
</s> remove * If false, it allows the output of the shader to be in hdr space (e.g. more than one) which is useful
* in combination of post process in float or half float mode.
</s> add * Secifies that the alpha is premultiplied before output (this enables alpha premultiplied blending).
* in your scene composition.
*/
protected _premultiplyAlpha = false;
/**
* A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
* And/Or ocllude the blended part.
</s> remove protected _ldrOutput = true;
</s> add protected _useAlphaFresnel = false;
@serialize()
protected _hdrLinearOutput = false;
/**
* Default configuration related to image processing available in the PBR Material.
*/
@serializeAsImageProcessing()
protected _imageProcessingConfiguration: ImageProcessing;
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the PBR Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
return;
}
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._markAllSubMeshesAsTexturesDirty();
});
// Ensure the effect will be rebuilt.
this._markAllSubMeshesAsTexturesDirty();
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts |
// Setup the default processing configuration to the scene.
this._attachImageProcessingConfiguration(null);
| <mask> constructor(name: string, scene: Scene) {
<mask> super(name, scene);
<mask>
<mask> this.getRenderTargetTextures = (): SmartArray<RenderTargetTexture> => {
<mask> this._renderTargets.reset();
<mask>
<mask> if (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
<mask> this._renderTargets.push(this._reflectionTexture);
<mask> }
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove this._useEmissiveAsIllumination = true;
</s> add </s> remove super(name, "imageProcessing", [
'contrast',
'vignetteSettings1',
'vignetteSettings2',
'cameraExposureLinear',
'vCameraColorCurveNegative',
'vCameraColorCurveNeutral',
'vCameraColorCurvePositive',
'colorTransformSettings'
], ["txColorTransform"], options, camera, samplingMode, engine, reusable,
</s> add super(name, "imageProcessing", [], [], options, camera, samplingMode, engine, reusable,
</s> remove public set cameraToneMappingEnabled(value: boolean) {
if (this._cameraToneMappingEnabled === value) {
return;
}
this._cameraToneMappingEnabled = value;
this._updateParameters();
}
</s> add /**
* Defines cache preventing GC.
*/
private _defines: IImageProcessingDefines & { FROMLINEARSPACE: boolean } = {
VIGNETTE: false,
VIGNETTEBLENDMODEMULTIPLY: false,
VIGNETTEBLENDMODEOPAQUE: false,
TONEMAPPING: false,
CONTRAST: false,
COLORCURVES: false,
COLORGRADING: false,
FROMLINEARSPACE: false,
}
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, this._activeEffect);
}
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts |
<mask> } else {
<mask> defines.REFRACTION = false;
<mask> }
<mask>
<mask> if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
<mask> // Camera Color Grading can not be none blocking.
<mask> if (!this._cameraColorGradingTexture.isReady()) {
<mask> return false;
<mask> } else {
<mask> defines.CAMERACOLORGRADING = true;
<mask> }
<mask> } else {
<mask> defines.CAMERACOLORGRADING = false;
<mask> }
<mask>
<mask> defines.TWOSIDEDLIGHTING = !this._backFaceCulling && this._twoSidedLighting;
<mask> } else {
<mask> defines.DIFFUSE = false;
<mask> defines.AMBIENT = false;
<mask> defines.OPACITY = false;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add </s> remove defines.CAMERACOLORCURVES = (this._cameraColorCurves !== undefined && this._cameraColorCurves !== null);
</s> add if (!this.imageProcessingConfiguration.isReady()) {
return false;
}
this.imageProcessingConfiguration.prepareDefines(defines);
</s> remove defines.CAMERACOLORGRADING = false;
</s> add </s> remove defines.LDROUTPUT = this._ldrOutput;
</s> add </s> remove defines.FRESNEL = true;
}
</s> add if (!this._imageProcessingConfiguration.isReady()) {
return false;
| [
"keep",
"keep",
"keep",
"keep",
"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/Materials/babylon.standardMaterial.ts | |
<mask> defines.EMISSIVE = false;
<mask> defines.LIGHTMAP = false;
<mask> defines.BUMP = false;
<mask> defines.REFRACTION = false;
<mask> defines.CAMERACOLORGRADING = false;
<mask> }
<mask>
<mask> defines.CAMERACOLORCURVES = (this._cameraColorCurves !== undefined && this._cameraColorCurves !== null);
<mask>
<mask> defines.ALPHAFROMDIFFUSE = this._shouldUseAlphaFromDiffuseTexture();
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove defines.CAMERACOLORCURVES = (this._cameraColorCurves !== undefined && this._cameraColorCurves !== null);
</s> add if (!this.imageProcessingConfiguration.isReady()) {
return false;
}
this.imageProcessingConfiguration.prepareDefines(defines);
</s> remove if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Camera Color Grading can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
} else {
defines.CAMERACOLORGRADING = true;
}
} else {
defines.CAMERACOLORGRADING = false;
}
</s> add </s> remove if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> add if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> remove public LDROUTPUT = true;
</s> add public PREMULTIPLYALPHA = false;
public ALPHAFRESNEL = false;
public IMAGEPROCESSING = false;
public VIGNETTE = false;
public VIGNETTEBLENDMODEMULTIPLY = false;
public VIGNETTEBLENDMODEOPAQUE = false;
public TONEMAPPING = false;
public CONTRAST = false;
public COLORCURVES = false;
public COLORGRADING = false;
public HDRLINEAROUTPUT = false;
</s> remove defines.ALPHATESTVALUE = this._alphaCutOff;
defines.ALPHABLEND = this.needAlphaBlending();
</s> add if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts | |
if (!this.imageProcessingConfiguration.isReady()) {
return false;
}
this.imageProcessingConfiguration.prepareDefines(defines);
| <mask> defines.REFRACTION = false;
<mask> defines.CAMERACOLORGRADING = false;
<mask> }
<mask>
<mask> defines.CAMERACOLORCURVES = (this._cameraColorCurves !== undefined && this._cameraColorCurves !== null);
<mask>
<mask> defines.ALPHAFROMDIFFUSE = this._shouldUseAlphaFromDiffuseTexture();
<mask>
<mask> defines.EMISSIVEASILLUMINATION = this._useEmissiveAsIllumination;
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove defines.CAMERACOLORGRADING = false;
</s> add </s> remove if ((this._metallic !== undefined && this._metallic !== null) || (this._roughness !== undefined && this._roughness !== null)) {
defines.METALLICWORKFLOW = true;
}
</s> add if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> remove if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
}
</s> add if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
</s> remove defines.ALPHATESTVALUE = this._alphaCutOff;
defines.ALPHABLEND = this.needAlphaBlending();
</s> add if (this._useRadianceOverAlpha) {
defines.RADIANCEOVERALPHA = true;
</s> remove if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Camera Color Grading can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
} else {
defines.CAMERACOLORGRADING = true;
}
} else {
defines.CAMERACOLORGRADING = false;
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts |
ImageProcessing.PrepareUniforms(uniforms, defines);
ImageProcessing.PrepareSamplers(samplers, defines);
| <mask> var samplers = ["diffuseSampler", "ambientSampler", "opacitySampler", "reflectionCubeSampler", "reflection2DSampler", "emissiveSampler", "specularSampler", "bumpSampler", "lightmapSampler", "refractionCubeSampler", "refraction2DSampler"]
<mask>
<mask> var uniformBuffers = ["Material", "Scene"];
<mask>
<mask> if (defines.CAMERACOLORCURVES) {
<mask> ColorCurves.PrepareUniforms(uniforms);
<mask> }
<mask> if (defines.CAMERACOLORGRADING) {
<mask> ColorGradingTexture.PrepareUniformsAndSamplers(uniforms, samplers);
<mask> }
<mask> MaterialHelper.PrepareUniformsAndSamplersList(<EffectCreationOptions>{
<mask> uniformsNames: uniforms,
<mask> uniformBuffersNames: uniformBuffers,
<mask> samplers: samplers,
<mask> defines: defines,
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove if (defines.CAMERACOLORCURVES) {
ColorCurves.PrepareUniforms(uniforms);
}
if (defines.CAMERACOLORGRADING) {
ColorGradingTexture.PrepareUniformsAndSamplers(uniforms, samplers);
}
</s> add ImageProcessing.PrepareUniforms(uniforms, defines);
ImageProcessing.PrepareSamplers(samplers, defines);
</s> remove "vMicrosurfaceTextureLods",
"vCameraInfos"
</s> add "vMicrosurfaceTextureLods"
</s> remove if (this.cameraToneMappingEnabled) {
defines += "#define TONEMAPPING\r\n";
}
if (this._colorCurvesEnabled && this.colorCurves) {
defines += "#define COLORCURVES\r\n";
}
if (this._fromLinearSpace) {
defines += "#define FROMLINEARSPACE\r\n";
}
this.updateEffect(defines, null, samplers);
}
// Statics
private static _VIGNETTEMODE_MULTIPLY = 0;
private static _VIGNETTEMODE_OPAQUE = 1;
</s> add var samplers = ["textureSampler"];
ImageProcessing.PrepareSamplers(samplers, this._defines);
</s> remove var samplers = ["textureSampler"];
if (this.colorGradingTexture) {
defines = "#define COLORGRADING\r\n";
samplers.push("txColorTransform");
}
if (this._vignetteEnabled) {
defines += "#define VIGNETTE\r\n";
if (this.vignetteBlendMode === ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY) {
defines += "#define VIGNETTEBLENDMODEMULTIPLY\r\n";
} else {
defines += "#define VIGNETTEBLENDMODEOPAQUE\r\n";
</s> add for (const define in this._defines) {
if (this._defines[define]) {
defines += `#define ${define};\r\n`;
</s> remove this._colorGradingTexture = value;
</s> add // Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
var camera = this.getCamera();
var scene = camera ? camera.getScene() : BABYLON.Engine.LastCreatedScene;
this._imageProcessingConfiguration = scene.imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._updateParameters();
});
// Ensure the effect will be rebuilt.
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts |
<mask> } else {
<mask> effect.setTexture("refraction2DSampler", this._refractionTexture);
<mask> }
<mask> }
<mask>
<mask> if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
<mask> ColorGradingTexture.Bind(this._cameraColorGradingTexture, effect);
<mask> }
<mask> }
<mask>
<mask> // Clip plane
<mask> MaterialHelper.BindClipPlane(effect, scene);
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, this._activeEffect);
}
</s> add </s> remove if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Camera Color Grading can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
} else {
defines.CAMERACOLORGRADING = true;
}
} else {
defines.CAMERACOLORGRADING = false;
}
</s> add </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add </s> remove // Color Curves
if (this._cameraColorCurves) {
ColorCurves.Bind(this._cameraColorCurves, effect);
</s> add // image processing
if (this.imageProcessingConfiguration) {
this.imageProcessingConfiguration.bind(this._activeEffect);
</s> remove
if (this._cameraColorGradingTexture && this._cameraColorGradingTexture.animations && this._cameraColorGradingTexture.animations.length > 0) {
results.push(this._cameraColorGradingTexture);
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts | |
// image processing
if (this.imageProcessingConfiguration) {
this.imageProcessingConfiguration.bind(this._activeEffect);
| <mask>
<mask> // Log. depth
<mask> MaterialHelper.BindLogDepth(defines, effect, scene);
<mask>
<mask> // Color Curves
<mask> if (this._cameraColorCurves) {
<mask> ColorCurves.Bind(this._cameraColorCurves, effect);
<mask> }
<mask>
<mask> }
<mask>
<mask> this._uniformBuffer.update();
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove this._cameraInfos.x = this._cameraExposure;
this._cameraInfos.y = this._cameraContrast;
effect.setVector4("vCameraInfos", this._cameraInfos);
if (this._cameraColorCurves) {
ColorCurves.Bind(this._cameraColorCurves, this._activeEffect);
</s> add // image processing
if (this._imageProcessingConfiguration) {
this._imageProcessingConfiguration.bind(this._activeEffect);
</s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, effect);
}
</s> add </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
ColorGradingTexture.Bind(this._cameraColorGradingTexture, this._activeEffect);
}
</s> add </s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
</s> remove let aspectRatio = this.aspectRatio;
// Color
if (this._colorCurvesEnabled) {
ColorCurves.Bind(this.colorCurves, effect);
}
if (this._vignetteEnabled) {
// Vignette
let vignetteScaleY = Math.tan(this.cameraFov * 0.5);
let vignetteScaleX = vignetteScaleY * aspectRatio;
let vignetteScaleGeometricMean = Math.sqrt(vignetteScaleX * vignetteScaleY);
vignetteScaleX = Tools.Mix(vignetteScaleX, vignetteScaleGeometricMean, this.vignetteStretch);
vignetteScaleY = Tools.Mix(vignetteScaleY, vignetteScaleGeometricMean, this.vignetteStretch);
effect.setFloat4('vignetteSettings1', vignetteScaleX, vignetteScaleY, -vignetteScaleX * this.vignetteCentreX, -vignetteScaleY * this.vignetteCentreY);
let vignettePower = -2.0 * this.vignetteWeight;
effect.setFloat4('vignetteSettings2', this.vignetteColor.r, this.vignetteColor.g, this.vignetteColor.b, vignettePower);
}
// Contrast and exposure
effect.setFloat('contrast', this.cameraContrast);
effect.setFloat('cameraExposureLinear', Math.pow(2.0, -this.cameraExposure) * Math.PI);
// Color transform settings
if (this._colorGradingTexture) {
effect.setTexture('txColorTransform', this.colorGradingTexture);
let textureSize = this.colorGradingTexture.getSize().height;
effect.setFloat4("colorTransformSettings",
(textureSize - 1) / textureSize, // textureScale
0.5 / textureSize, // textureOffset
textureSize, // textureSize
this.colorGradingWeight // weight
);
}
</s> add this.imageProcessingConfiguration.bind(effect, this.aspectRatio);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts |
<mask>
<mask> if (this._refractionTexture && this._refractionTexture.animations && this._refractionTexture.animations.length > 0) {
<mask> results.push(this._refractionTexture);
<mask> }
<mask>
<mask> if (this._cameraColorGradingTexture && this._cameraColorGradingTexture.animations && this._cameraColorGradingTexture.animations.length > 0) {
<mask> results.push(this._cameraColorGradingTexture);
<mask> }
<mask>
<mask> return results;
<mask> }
<mask>
<mask> public dispose(forceDisposeEffect?: boolean, forceDisposeTextures?: boolean): void {
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts | |
}
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
| <mask>
<mask> if (this._refractionTexture) {
<mask> this._refractionTexture.dispose();
<mask> }
<mask>
<mask> if (this._cameraColorGradingTexture) {
<mask> this._cameraColorGradingTexture.dispose();
<mask> }
<mask> }
<mask>
<mask> super.dispose(forceDisposeEffect, forceDisposeTextures);
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove
if (this._cameraColorGradingTexture) {
this._cameraColorGradingTexture.dispose();
}
</s> add </s> remove if (this._useEmissiveAsIllumination) {
defines.EMISSIVEASILLUMINATION = true;
}
if (this._cameraContrast != 1) {
defines.CAMERACONTRAST = true;
}
if (this._cameraExposure != 1) {
defines.CAMERATONEMAP = true;
}
if (this._cameraColorCurves) {
defines.CAMERACOLORCURVES = true;
}
if (this._useSpecularOverAlpha) {
defines.SPECULAROVERALPHA = true;
}
if (this._usePhysicalLightFalloff) {
defines.USEPHYSICALLIGHTFALLOFF = true;
}
</s> add }
</s> remove if (defines.OPACITYFRESNEL) {
fallbacks.addFallback(1, "OPACITYFRESNEL");
}
if (defines.EMISSIVEFRESNEL) {
fallbacks.addFallback(2, "EMISSIVEFRESNEL");
}
if (defines.FRESNEL) {
fallbacks.addFallback(3, "FRESNEL");
}
</s> add </s> remove
if (this._cameraColorGradingTexture && StandardMaterial.ColorGradingTextureEnabled) {
// Color Grading texure can not be none blocking.
if (!this._cameraColorGradingTexture.isReady()) {
return false;
}
defines.CAMERACOLORGRADING = true;
}
if (!this.backFaceCulling && this._twoSidedLighting) {
defines.TWOSIDEDLIGHTING = true;
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/Materials/babylon.standardMaterial.ts |
/**
* Default configuration related to image processing available in the PBR Material.
*/
protected _imageProcessingConfiguration: ImageProcessing;
| <mask> public colorGradingWeight: number = 1.0;
<mask> public colorCurves = new ColorCurves();
<mask> private _colorCurvesEnabled = true;
<mask>
<mask> public cameraFov = 0.5;
<mask>
<mask> public vignetteStretch = 0;
<mask> public vignetteCentreX = 0;
<mask> public vignetteCentreY = 0;
<mask> public vignetteWeight = 1.5;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public vignetteStretch = 0;
public vignetteCentreX = 0;
public vignetteCentreY = 0;
public vignetteWeight = 1.5;
public vignetteColor: BABYLON.Color4 = new BABYLON.Color4(0, 0, 0, 0);
private _vignetteBlendMode = ImageProcessingPostProcess.VIGNETTEMODE_MULTIPLY;
private _vignetteEnabled = true;
public cameraContrast = 1.0;
public cameraExposure = 1.68;
private _cameraToneMappingEnabled = true;
private _fromLinearSpace = false;
</s> add /**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
</s> remove public LDROUTPUT = true;
</s> add public PREMULTIPLYALPHA = false;
public ALPHAFRESNEL = false;
public IMAGEPROCESSING = false;
public VIGNETTE = false;
public VIGNETTEBLENDMODEMULTIPLY = false;
public VIGNETTEBLENDMODEOPAQUE = false;
public TONEMAPPING = false;
public CONTRAST = false;
public COLORCURVES = false;
public COLORGRADING = false;
public HDRLINEAROUTPUT = false;
</s> remove public EMISSIVEASILLUMINATION = false;
</s> add </s> remove public CAMERACOLORGRADING = false;
public CAMERACOLORCURVES = false;
</s> add </s> remove public static get VIGNETTEMODE_MULTIPLY(): number {
return ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY;
}
</s> add var uniforms = [];
ImageProcessing.PrepareUniforms(uniforms, this._defines);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts |
/**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
| <mask> private _colorCurvesEnabled = true;
<mask>
<mask> public cameraFov = 0.5;
<mask>
<mask> public vignetteStretch = 0;
<mask> public vignetteCentreX = 0;
<mask> public vignetteCentreY = 0;
<mask> public vignetteWeight = 1.5;
<mask> public vignetteColor: BABYLON.Color4 = new BABYLON.Color4(0, 0, 0, 0);
<mask> private _vignetteBlendMode = ImageProcessingPostProcess.VIGNETTEMODE_MULTIPLY;
<mask> private _vignetteEnabled = true;
<mask>
<mask> public cameraContrast = 1.0;
<mask> public cameraExposure = 1.68;
<mask> private _cameraToneMappingEnabled = true;
<mask>
<mask> private _fromLinearSpace = false;
<mask>
<mask> public get colorGradingTexture(): BaseTexture {
<mask> return this._colorGradingTexture;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public cameraFov = 0.5;
</s> add /**
* Default configuration related to image processing available in the PBR Material.
*/
protected _imageProcessingConfiguration: ImageProcessing;
</s> remove public get colorGradingTexture(): BaseTexture {
return this._colorGradingTexture;
</s> add /**
* Sets the Default image processing configuration used either in the this material.
*
* If sets to null, the scene one is in use.
*/
public set imageProcessingConfiguration(value: ImageProcessing) {
this._attachImageProcessingConfiguration(value);
</s> remove public static get VIGNETTEMODE_MULTIPLY(): number {
return ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY;
}
</s> add var uniforms = [];
ImageProcessing.PrepareUniforms(uniforms, this._defines);
</s> remove public LDROUTPUT = true;
</s> add public PREMULTIPLYALPHA = false;
public ALPHAFRESNEL = false;
public IMAGEPROCESSING = false;
public VIGNETTE = false;
public VIGNETTEBLENDMODEMULTIPLY = false;
public VIGNETTEBLENDMODEOPAQUE = false;
public TONEMAPPING = false;
public CONTRAST = false;
public COLORCURVES = false;
public COLORGRADING = false;
public HDRLINEAROUTPUT = false;
</s> remove private convertColorToLinearSpaceToRef(color: Color3, ref: Color3): void {
PBRMaterial.convertColorToLinearSpaceToRef(color, ref, this._useScalarInLinearSpace);
}
private static convertColorToLinearSpaceToRef(color: Color3, ref: Color3, useScalarInLinear: boolean): void {
if (!useScalarInLinear) {
color.toLinearSpaceToRef(ref);
} else {
ref.r = color.r;
ref.g = color.g;
ref.b = color.b;
}
}
private static _scaledAlbedo = new Color3();
</s> add | [
"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/PostProcess/babylon.imageProcessingPostProcess.ts |
/**
* Sets the Default image processing configuration used either in the this material.
*
* If sets to null, the scene one is in use.
*/
public set imageProcessingConfiguration(value: ImageProcessing) {
this._attachImageProcessingConfiguration(value);
| <mask> private _cameraToneMappingEnabled = true;
<mask>
<mask> private _fromLinearSpace = false;
<mask>
<mask> public get colorGradingTexture(): BaseTexture {
<mask> return this._colorGradingTexture;
<mask> }
<mask>
<mask> public set colorGradingTexture(value: BaseTexture) {
<mask> if (this._colorGradingTexture === value) {
<mask> return;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public set colorGradingTexture(value: BaseTexture) {
if (this._colorGradingTexture === value) {
</s> add /**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the PBR Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
</s> remove public vignetteStretch = 0;
public vignetteCentreX = 0;
public vignetteCentreY = 0;
public vignetteWeight = 1.5;
public vignetteColor: BABYLON.Color4 = new BABYLON.Color4(0, 0, 0, 0);
private _vignetteBlendMode = ImageProcessingPostProcess.VIGNETTEMODE_MULTIPLY;
private _vignetteEnabled = true;
public cameraContrast = 1.0;
public cameraExposure = 1.68;
private _cameraToneMappingEnabled = true;
private _fromLinearSpace = false;
</s> add /**
* Gets the image processing configuration used either in this material.
*/
public get imageProcessingConfiguration(): ImageProcessing {
return this._imageProcessingConfiguration;
}
</s> remove this._vignetteBlendMode = value;
this._updateParameters();
}
</s> add /**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts |
/**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the PBR Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
| <mask> public get colorGradingTexture(): BaseTexture {
<mask> return this._colorGradingTexture;
<mask> }
<mask>
<mask> public set colorGradingTexture(value: BaseTexture) {
<mask> if (this._colorGradingTexture === value) {
<mask> return;
<mask> }
<mask>
<mask> this._colorGradingTexture = value;
<mask> this._updateParameters();
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public get colorGradingTexture(): BaseTexture {
return this._colorGradingTexture;
</s> add /**
* Sets the Default image processing configuration used either in the this material.
*
* If sets to null, the scene one is in use.
*/
public set imageProcessingConfiguration(value: ImageProcessing) {
this._attachImageProcessingConfiguration(value);
</s> remove this._vignetteBlendMode = value;
this._updateParameters();
}
</s> add /**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove public get vignetteBlendMode(): number {
return this._vignetteBlendMode;
</s> add /**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
</s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts |
// Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
var camera = this.getCamera();
var scene = camera ? camera.getScene() : BABYLON.Engine.LastCreatedScene;
this._imageProcessingConfiguration = scene.imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._updateParameters();
});
// Ensure the effect will be rebuilt.
| <mask> if (this._colorGradingTexture === value) {
<mask> return;
<mask> }
<mask>
<mask> this._colorGradingTexture = value;
<mask> this._updateParameters();
<mask> }
<mask>
<mask> public get vignetteBlendMode(): number {
<mask> return this._vignetteBlendMode;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public get vignetteBlendMode(): number {
return this._vignetteBlendMode;
</s> add /**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
</s> remove public set vignetteBlendMode(value: number) {
if (this._vignetteBlendMode === value) {
return;
}
</s> add /**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
</s> remove public set colorGradingTexture(value: BaseTexture) {
if (this._colorGradingTexture === value) {
</s> add /**
* Keep track of the image processing observer to allow dispose and replace.
*/
private _imageProcessingObserver: Observer<ImageProcessing>;
/**
* Attaches a new image processing configuration to the PBR Material.
* @param configuration
*/
protected _attachImageProcessingConfiguration(configuration: ImageProcessing): void {
if (configuration === this._imageProcessingConfiguration) {
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts |
/**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
| <mask> this._colorGradingTexture = value;
<mask> this._updateParameters();
<mask> }
<mask>
<mask> public get vignetteBlendMode(): number {
<mask> return this._vignetteBlendMode;
<mask> }
<mask>
<mask> public set vignetteBlendMode(value: number) {
<mask> if (this._vignetteBlendMode === value) {
<mask> return;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public set vignetteBlendMode(value: number) {
if (this._vignetteBlendMode === value) {
return;
}
</s> add /**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
</s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
</s> remove public set vignetteEnabled(value: boolean) {
if (this._vignetteEnabled === value) {
return;
}
</s> add /**
* Gets Vignette centre X Offset.
*/
public get vignetteCentreX(): number {
return this.imageProcessingConfiguration.vignetteCentreX;
}
/**
* Sets Vignette centre X Offset.
*/
public set vignetteCentreX(value: number) {
this.imageProcessingConfiguration.vignetteCentreX = value;
}
</s> remove this._colorGradingTexture = value;
</s> add // Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
var camera = this.getCamera();
var scene = camera ? camera.getScene() : BABYLON.Engine.LastCreatedScene;
this._imageProcessingConfiguration = scene.imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._updateParameters();
});
// Ensure the effect will be rebuilt.
</s> remove public set colorCurvesEnabled(value: boolean) {
if (this._colorCurvesEnabled === value) {
return;
}
</s> add /**
* Gets Camera exposure used in the effect.
*/
public get cameraExposure(): number {
return this.imageProcessingConfiguration.cameraExposure;
}
/**
* Sets Camera exposure used in the effect.
*/
public set cameraExposure(value: number) {
this.imageProcessingConfiguration.cameraExposure = value;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts |
/**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
| <mask> public get vignetteBlendMode(): number {
<mask> return this._vignetteBlendMode;
<mask> }
<mask>
<mask> public set vignetteBlendMode(value: number) {
<mask> if (this._vignetteBlendMode === value) {
<mask> return;
<mask> }
<mask>
<mask> this._vignetteBlendMode = value;
<mask> this._updateParameters();
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public get vignetteBlendMode(): number {
return this._vignetteBlendMode;
</s> add /**
* Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public get colorCurves(): ColorCurves {
return this.imageProcessingConfiguration.colorCurves;
}
/**
* Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
*/
public set colorCurves(value: ColorCurves) {
this.imageProcessingConfiguration.colorCurves = value;
</s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
</s> remove public set vignetteEnabled(value: boolean) {
if (this._vignetteEnabled === value) {
return;
}
</s> add /**
* Gets Vignette centre X Offset.
*/
public get vignetteCentreX(): number {
return this.imageProcessingConfiguration.vignetteCentreX;
}
/**
* Sets Vignette centre X Offset.
*/
public set vignetteCentreX(value: number) {
this.imageProcessingConfiguration.vignetteCentreX = value;
}
</s> remove this._vignetteBlendMode = value;
this._updateParameters();
}
</s> add /**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
</s> remove public set colorCurvesEnabled(value: boolean) {
if (this._colorCurvesEnabled === value) {
return;
}
</s> add /**
* Gets Camera exposure used in the effect.
*/
public get cameraExposure(): number {
return this.imageProcessingConfiguration.cameraExposure;
}
/**
* Sets Camera exposure used in the effect.
*/
public set cameraExposure(value: number) {
this.imageProcessingConfiguration.cameraExposure = value;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts |
/**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
| <mask> if (this._vignetteBlendMode === value) {
<mask> return;
<mask> }
<mask>
<mask> this._vignetteBlendMode = value;
<mask> this._updateParameters();
<mask> }
<mask>
<mask> public get colorCurvesEnabled(): boolean {
<mask> return this._colorCurvesEnabled;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public get colorCurvesEnabled(): boolean {
return this._colorCurvesEnabled;
</s> add /**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
</s> remove public set vignetteBlendMode(value: number) {
if (this._vignetteBlendMode === value) {
return;
}
</s> add /**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
</s> remove public set colorCurvesEnabled(value: boolean) {
if (this._colorCurvesEnabled === value) {
return;
}
</s> add /**
* Gets Camera exposure used in the effect.
*/
public get cameraExposure(): number {
return this.imageProcessingConfiguration.cameraExposure;
}
/**
* Sets Camera exposure used in the effect.
*/
public set cameraExposure(value: number) {
this.imageProcessingConfiguration.cameraExposure = value;
}
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove public set vignetteEnabled(value: boolean) {
if (this._vignetteEnabled === value) {
return;
}
</s> add /**
* Gets Vignette centre X Offset.
*/
public get vignetteCentreX(): number {
return this.imageProcessingConfiguration.vignetteCentreX;
}
/**
* Sets Vignette centre X Offset.
*/
public set vignetteCentreX(value: number) {
this.imageProcessingConfiguration.vignetteCentreX = value;
}
| [
"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 |
/**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
| <mask> this._vignetteBlendMode = value;
<mask> this._updateParameters();
<mask> }
<mask>
<mask> public get colorCurvesEnabled(): boolean {
<mask> return this._colorCurvesEnabled;
<mask> }
<mask>
<mask> public set colorCurvesEnabled(value: boolean) {
<mask> if (this._colorCurvesEnabled === value) {
<mask> return;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public set colorCurvesEnabled(value: boolean) {
if (this._colorCurvesEnabled === value) {
return;
}
</s> add /**
* Gets Camera exposure used in the effect.
*/
public get cameraExposure(): number {
return this.imageProcessingConfiguration.cameraExposure;
}
/**
* Sets Camera exposure used in the effect.
*/
public set cameraExposure(value: number) {
this.imageProcessingConfiguration.cameraExposure = value;
}
</s> remove public set vignetteBlendMode(value: number) {
if (this._vignetteBlendMode === value) {
return;
}
</s> add /**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
</s> remove this._vignetteBlendMode = value;
this._updateParameters();
}
</s> add /**
* Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public get colorGradingTexture(): BaseTexture {
return this.imageProcessingConfiguration.colorGradingTexture;
}
/**
* Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
*/
public set colorGradingTexture(value: BaseTexture) {
this.imageProcessingConfiguration.colorGradingTexture = value;
}
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts |
/**
* Gets Camera exposure used in the effect.
*/
public get cameraExposure(): number {
return this.imageProcessingConfiguration.cameraExposure;
}
/**
* Sets Camera exposure used in the effect.
*/
public set cameraExposure(value: number) {
this.imageProcessingConfiguration.cameraExposure = value;
}
| <mask> public get colorCurvesEnabled(): boolean {
<mask> return this._colorCurvesEnabled;
<mask> }
<mask>
<mask> public set colorCurvesEnabled(value: boolean) {
<mask> if (this._colorCurvesEnabled === value) {
<mask> return;
<mask> }
<mask>
<mask> this._colorCurvesEnabled = value;
<mask> this._updateParameters();
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public get colorCurvesEnabled(): boolean {
return this._colorCurvesEnabled;
</s> add /**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
</s> remove public set vignetteBlendMode(value: number) {
if (this._vignetteBlendMode === value) {
return;
}
</s> add /**
* Gets wether the color curves effect is enabled.
*/
public get colorCurvesEnabled(): boolean {
return this.imageProcessingConfiguration.colorCurvesEnabled;
}
/**
* Sets wether the color curves effect is enabled.
*/
public set colorCurvesEnabled(value: boolean) {
this.imageProcessingConfiguration.colorCurvesEnabled = value;
}
</s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove this._colorCurvesEnabled = value;
this._updateParameters();
}
</s> add /**
* Gets Camera contrast used in the effect.
*/
public get cameraContrast(): number {
return this.imageProcessingConfiguration.cameraContrast;
}
/**
* Sets Camera contrast used in the effect.
*/
public set cameraContrast(value: number) {
this.imageProcessingConfiguration.cameraContrast = value;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts |
/**
* Gets Camera contrast used in the effect.
*/
public get cameraContrast(): number {
return this.imageProcessingConfiguration.cameraContrast;
}
/**
* Sets Camera contrast used in the effect.
*/
public set cameraContrast(value: number) {
this.imageProcessingConfiguration.cameraContrast = value;
}
| <mask> if (this._colorCurvesEnabled === value) {
<mask> return;
<mask> }
<mask>
<mask> this._colorCurvesEnabled = value;
<mask> this._updateParameters();
<mask> }
<mask>
<mask> public get vignetteEnabled(): boolean {
<mask> return this._vignetteEnabled;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
</s> remove public set vignetteEnabled(value: boolean) {
if (this._vignetteEnabled === value) {
return;
}
</s> add /**
* Gets Vignette centre X Offset.
*/
public get vignetteCentreX(): number {
return this.imageProcessingConfiguration.vignetteCentreX;
}
/**
* Sets Vignette centre X Offset.
*/
public set vignetteCentreX(value: number) {
this.imageProcessingConfiguration.vignetteCentreX = value;
}
</s> remove public set colorCurvesEnabled(value: boolean) {
if (this._colorCurvesEnabled === value) {
return;
}
</s> add /**
* Gets Camera exposure used in the effect.
*/
public get cameraExposure(): number {
return this.imageProcessingConfiguration.cameraExposure;
}
/**
* Sets Camera exposure used in the effect.
*/
public set cameraExposure(value: number) {
this.imageProcessingConfiguration.cameraExposure = value;
}
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove public get colorCurvesEnabled(): boolean {
return this._colorCurvesEnabled;
</s> add /**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
| [
"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 |
/**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
| <mask> this._colorCurvesEnabled = value;
<mask> this._updateParameters();
<mask> }
<mask>
<mask> public get vignetteEnabled(): boolean {
<mask> return this._vignetteEnabled;
<mask> }
<mask>
<mask> public set vignetteEnabled(value: boolean) {
<mask> if (this._vignetteEnabled === value) {
<mask> return;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public set vignetteEnabled(value: boolean) {
if (this._vignetteEnabled === value) {
return;
}
</s> add /**
* Gets Vignette centre X Offset.
*/
public get vignetteCentreX(): number {
return this.imageProcessingConfiguration.vignetteCentreX;
}
/**
* Sets Vignette centre X Offset.
*/
public set vignetteCentreX(value: number) {
this.imageProcessingConfiguration.vignetteCentreX = value;
}
</s> remove this._colorCurvesEnabled = value;
this._updateParameters();
}
</s> add /**
* Gets Camera contrast used in the effect.
*/
public get cameraContrast(): number {
return this.imageProcessingConfiguration.cameraContrast;
}
/**
* Sets Camera contrast used in the effect.
*/
public set cameraContrast(value: number) {
this.imageProcessingConfiguration.cameraContrast = value;
}
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove public set colorCurvesEnabled(value: boolean) {
if (this._colorCurvesEnabled === value) {
return;
}
</s> add /**
* Gets Camera exposure used in the effect.
*/
public get cameraExposure(): number {
return this.imageProcessingConfiguration.cameraExposure;
}
/**
* Sets Camera exposure used in the effect.
*/
public set cameraExposure(value: number) {
this.imageProcessingConfiguration.cameraExposure = value;
}
</s> remove public get colorCurvesEnabled(): boolean {
return this._colorCurvesEnabled;
</s> add /**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts |
/**
* Gets Vignette centre X Offset.
*/
public get vignetteCentreX(): number {
return this.imageProcessingConfiguration.vignetteCentreX;
}
/**
* Sets Vignette centre X Offset.
*/
public set vignetteCentreX(value: number) {
this.imageProcessingConfiguration.vignetteCentreX = value;
}
| <mask> public get vignetteEnabled(): boolean {
<mask> return this._vignetteEnabled;
<mask> }
<mask>
<mask> public set vignetteEnabled(value: boolean) {
<mask> if (this._vignetteEnabled === value) {
<mask> return;
<mask> }
<mask>
<mask> this._vignetteEnabled = value;
<mask> this._updateParameters();
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
</s> remove this._colorCurvesEnabled = value;
this._updateParameters();
}
</s> add /**
* Gets Camera contrast used in the effect.
*/
public get cameraContrast(): number {
return this.imageProcessingConfiguration.cameraContrast;
}
/**
* Sets Camera contrast used in the effect.
*/
public set cameraContrast(value: number) {
this.imageProcessingConfiguration.cameraContrast = value;
}
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove this._vignetteEnabled = value;
this._updateParameters();
}
</s> add /**
* Gets Vignette centre Y Offset.
*/
public get vignetteCentreY(): number {
return this.imageProcessingConfiguration.vignetteCentreY;
}
/**
* Sets Vignette centre Y Offset.
*/
public set vignetteCentreY(value: number) {
this.imageProcessingConfiguration.vignetteCentreY = value;
}
/**
* Gets Vignette weight or intensity of the vignette effect.
*/
public get vignetteWeight(): number {
return this.imageProcessingConfiguration.vignetteWeight;
}
/**
* Sets Vignette weight or intensity of the vignette effect.
*/
public set vignetteWeight(value: number) {
this.imageProcessingConfiguration.vignetteWeight = value;
}
</s> remove public get colorCurvesEnabled(): boolean {
return this._colorCurvesEnabled;
</s> add /**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts |
/**
* Gets Vignette centre Y Offset.
*/
public get vignetteCentreY(): number {
return this.imageProcessingConfiguration.vignetteCentreY;
}
/**
* Sets Vignette centre Y Offset.
*/
public set vignetteCentreY(value: number) {
this.imageProcessingConfiguration.vignetteCentreY = value;
}
/**
* Gets Vignette weight or intensity of the vignette effect.
*/
public get vignetteWeight(): number {
return this.imageProcessingConfiguration.vignetteWeight;
}
/**
* Sets Vignette weight or intensity of the vignette effect.
*/
public set vignetteWeight(value: number) {
this.imageProcessingConfiguration.vignetteWeight = value;
}
| <mask> if (this._vignetteEnabled === value) {
<mask> return;
<mask> }
<mask>
<mask> this._vignetteEnabled = value;
<mask> this._updateParameters();
<mask> }
<mask>
<mask> public get fromLinearSpace(): boolean {
<mask> return this._fromLinearSpace;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public set vignetteEnabled(value: boolean) {
if (this._vignetteEnabled === value) {
return;
}
</s> add /**
* Gets Vignette centre X Offset.
*/
public get vignetteCentreX(): number {
return this.imageProcessingConfiguration.vignetteCentreX;
}
/**
* Sets Vignette centre X Offset.
*/
public set vignetteCentreX(value: number) {
this.imageProcessingConfiguration.vignetteCentreX = value;
}
</s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove
</s> add /**
* Sets wether the input of the processing is in Gamma or Linear Space.
*/
</s> remove this._colorCurvesEnabled = value;
this._updateParameters();
}
</s> add /**
* Gets Camera contrast used in the effect.
*/
public get cameraContrast(): number {
return this.imageProcessingConfiguration.cameraContrast;
}
/**
* Sets Camera contrast used in the effect.
*/
public set cameraContrast(value: number) {
this.imageProcessingConfiguration.cameraContrast = value;
}
| [
"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 |
/**
* Sets wether the input of the processing is in Gamma or Linear Space.
*/
| <mask>
<mask> public get fromLinearSpace(): boolean {
<mask> return this._fromLinearSpace;
<mask> }
<mask>
<mask> public set fromLinearSpace(value: boolean) {
<mask> if (this._fromLinearSpace === value) {
<mask> return;
<mask> }
<mask>
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove this._vignetteEnabled = value;
this._updateParameters();
}
</s> add /**
* Gets Vignette centre Y Offset.
*/
public get vignetteCentreY(): number {
return this.imageProcessingConfiguration.vignetteCentreY;
}
/**
* Sets Vignette centre Y Offset.
*/
public set vignetteCentreY(value: number) {
this.imageProcessingConfiguration.vignetteCentreY = value;
}
/**
* Gets Vignette weight or intensity of the vignette effect.
*/
public get vignetteWeight(): number {
return this.imageProcessingConfiguration.vignetteWeight;
}
/**
* Sets Vignette weight or intensity of the vignette effect.
*/
public set vignetteWeight(value: number) {
this.imageProcessingConfiguration.vignetteWeight = value;
}
</s> remove public get colorCurvesEnabled(): boolean {
return this._colorCurvesEnabled;
</s> add /**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
</s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
</s> remove public set vignetteEnabled(value: boolean) {
if (this._vignetteEnabled === value) {
return;
}
</s> add /**
* Gets Vignette centre X Offset.
*/
public get vignetteCentreX(): number {
return this.imageProcessingConfiguration.vignetteCentreX;
}
/**
* Sets Vignette centre X Offset.
*/
public set vignetteCentreX(value: number) {
this.imageProcessingConfiguration.vignetteCentreX = value;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts |
<mask> }
<mask>
<mask> this._fromLinearSpace = value;
<mask> this._updateParameters();
<mask> }
<mask>
<mask> public get cameraToneMappingEnabled(): boolean {
<mask> return this._cameraToneMappingEnabled;
<mask> }
<mask>
<mask> public set cameraToneMappingEnabled(value: boolean) {
<mask> if (this._cameraToneMappingEnabled === value) {
<mask> return;
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public set cameraToneMappingEnabled(value: boolean) {
if (this._cameraToneMappingEnabled === value) {
return;
}
this._cameraToneMappingEnabled = value;
this._updateParameters();
}
</s> add /**
* Defines cache preventing GC.
*/
private _defines: IImageProcessingDefines & { FROMLINEARSPACE: boolean } = {
VIGNETTE: false,
VIGNETTEBLENDMODEMULTIPLY: false,
VIGNETTEBLENDMODEOPAQUE: false,
TONEMAPPING: false,
CONTRAST: false,
COLORCURVES: false,
COLORGRADING: false,
FROMLINEARSPACE: false,
}
</s> remove public get colorCurvesEnabled(): boolean {
return this._colorCurvesEnabled;
</s> add /**
* Gets wether the color grading effect is enabled.
*/
public get colorGradingEnabled(): boolean {
return this.imageProcessingConfiguration.colorGradingEnabled;
}
/**
* Gets wether the color grading effect is enabled.
*/
public set colorGradingEnabled(value: boolean) {
this.imageProcessingConfiguration.colorGradingEnabled = value;
</s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
</s> remove public set vignetteEnabled(value: boolean) {
if (this._vignetteEnabled === value) {
return;
}
</s> add /**
* Gets Vignette centre X Offset.
*/
public get vignetteCentreX(): number {
return this.imageProcessingConfiguration.vignetteCentreX;
}
/**
* Sets Vignette centre X Offset.
*/
public set vignetteCentreX(value: number) {
this.imageProcessingConfiguration.vignetteCentreX = value;
}
</s> remove public set colorCurvesEnabled(value: boolean) {
if (this._colorCurvesEnabled === value) {
return;
}
</s> add /**
* Gets Camera exposure used in the effect.
*/
public get cameraExposure(): number {
return this.imageProcessingConfiguration.cameraExposure;
}
/**
* Sets Camera exposure used in the effect.
*/
public set cameraExposure(value: number) {
this.imageProcessingConfiguration.cameraExposure = value;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/f4b3f860b0ff0c111ea13cd3960c2c72ea597882 | src/PostProcess/babylon.imageProcessingPostProcess.ts | |
/**
* Defines cache preventing GC.
*/
private _defines: IImageProcessingDefines & { FROMLINEARSPACE: boolean } = {
VIGNETTE: false,
VIGNETTEBLENDMODEMULTIPLY: false,
VIGNETTEBLENDMODEOPAQUE: false,
TONEMAPPING: false,
CONTRAST: false,
COLORCURVES: false,
COLORGRADING: false,
FROMLINEARSPACE: false,
}
| <mask> public get cameraToneMappingEnabled(): boolean {
<mask> return this._cameraToneMappingEnabled;
<mask> }
<mask>
<mask> public set cameraToneMappingEnabled(value: boolean) {
<mask> if (this._cameraToneMappingEnabled === value) {
<mask> return;
<mask> }
<mask>
<mask> this._cameraToneMappingEnabled = value;
<mask> this._updateParameters();
<mask> }
<mask>
<mask> constructor(name: string, options: number | PostProcessOptions, camera?: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Engine.TEXTURETYPE_UNSIGNED_INT) {
<mask> super(name, "imageProcessing", [
<mask> 'contrast',
<mask> 'vignetteSettings1',
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove super(name, "imageProcessing", [
'contrast',
'vignetteSettings1',
'vignetteSettings2',
'cameraExposureLinear',
'vCameraColorCurveNegative',
'vCameraColorCurveNeutral',
'vCameraColorCurvePositive',
'colorTransformSettings'
], ["txColorTransform"], options, camera, samplingMode, engine, reusable,
</s> add super(name, "imageProcessing", [], [], options, camera, samplingMode, engine, reusable,
</s> remove }
public get cameraToneMappingEnabled(): boolean {
return this._cameraToneMappingEnabled;
</s> add </s> remove public get vignetteEnabled(): boolean {
return this._vignetteEnabled;
</s> add /**
* Gets Vignette stretch size.
*/
public get vignetteStretch(): number {
return this.imageProcessingConfiguration.vignetteStretch;
}
/**
* Sets Vignette stretch size.
*/
public set vignetteStretch(value: number) {
this.imageProcessingConfiguration.vignetteStretch = value;
</s> remove public set vignetteEnabled(value: boolean) {
if (this._vignetteEnabled === value) {
return;
}
</s> add /**
* Gets Vignette centre X Offset.
*/
public get vignetteCentreX(): number {
return this.imageProcessingConfiguration.vignetteCentreX;
}
/**
* Sets Vignette centre X Offset.
*/
public set vignetteCentreX(value: number) {
this.imageProcessingConfiguration.vignetteCentreX = value;
}
</s> remove public set colorCurvesEnabled(value: boolean) {
if (this._colorCurvesEnabled === value) {
return;
}
</s> add /**
* Gets Camera exposure used in the effect.
*/
public get cameraExposure(): number {
return this.imageProcessingConfiguration.cameraExposure;
}
/**
* Sets Camera exposure used in the effect.
*/
public set cameraExposure(value: number) {
this.imageProcessingConfiguration.cameraExposure = value;
}
| [
"keep",
"keep",
"keep",
"keep",
"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 |
super(name, "imageProcessing", [], [], options, camera, samplingMode, engine, reusable,
| <mask> this._updateParameters();
<mask> }
<mask>
<mask> constructor(name: string, options: number | PostProcessOptions, camera?: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Engine.TEXTURETYPE_UNSIGNED_INT) {
<mask> super(name, "imageProcessing", [
<mask> 'contrast',
<mask> 'vignetteSettings1',
<mask> 'vignetteSettings2',
<mask> 'cameraExposureLinear',
<mask> 'vCameraColorCurveNegative',
<mask> 'vCameraColorCurveNeutral',
<mask> 'vCameraColorCurvePositive',
<mask> 'colorTransformSettings'
<mask> ], ["txColorTransform"], options, camera, samplingMode, engine, reusable,
<mask> null, textureType, "postprocess", null, true);
<mask>
<mask> this._updateParameters();
<mask>
<mask> this.onApply = (effect: Effect) => {
</s> image processing to material integration
Former-commit-id: 6f831aa9b68d14576abec6488e88ca588f2468b3 </s> remove public set cameraToneMappingEnabled(value: boolean) {
if (this._cameraToneMappingEnabled === value) {
return;
}
this._cameraToneMappingEnabled = value;
this._updateParameters();
}
</s> add /**
* Defines cache preventing GC.
*/
private _defines: IImageProcessingDefines & { FROMLINEARSPACE: boolean } = {
VIGNETTE: false,
VIGNETTEBLENDMODEMULTIPLY: false,
VIGNETTEBLENDMODEOPAQUE: false,
TONEMAPPING: false,
CONTRAST: false,
COLORCURVES: false,
COLORGRADING: false,
FROMLINEARSPACE: false,
}
</s> remove this._useEmissiveAsIllumination = true;
</s> add </s> remove this._colorGradingTexture = value;
</s> add // Detaches observer.
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
}
// Pick the scene configuration if needed.
if (!configuration) {
var camera = this.getCamera();
var scene = camera ? camera.getScene() : BABYLON.Engine.LastCreatedScene;
this._imageProcessingConfiguration = scene.imageProcessingConfiguration;
}
else {
this._imageProcessingConfiguration = configuration;
}
// Attaches observer.
this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(conf => {
this._updateParameters();
});
// Ensure the effect will be rebuilt.
| [
"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/PostProcess/babylon.imageProcessingPostProcess.ts |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.