Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add get/set accessors for ShaderMaterial._shaderPath #7037

Merged
merged 2 commits into from Oct 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions dist/preview release/what's new.md
Expand Up @@ -108,6 +108,7 @@

- Added `ShaderMaterial.setColor4Array` ([JonathanTron](https://github.com/JonathanTron/))
- Added `ShaderMaterial.setArray4` ([JonathanTron](https://github.com/JonathanTron/))
- Added get/set accessors for `ShaderMaterial._shaderPath` ([Popov72](https://github.com/Popov72))
- Added `scene.environmentIntensity` to control the IBL strength overall in a scene ([Sebavan](https://github.com/sebavan/))
- Added support of image processing for `WaterMaterial` ([julien-moreau](https://github.com/julien-moreau))
- Added `pbrBRDFConfiguration.useSpecularGlossinessInputEnergyConservation` to allow Specular-Workflow energy conservation to be turned off ([ColorDigital-PS](https://github.com/ColorDigital-PS)).
Expand Down
16 changes: 16 additions & 0 deletions src/Materials/shaderMaterial.ts
Expand Up @@ -117,6 +117,22 @@ export class ShaderMaterial extends Material {
};
}

/**
* Gets the shader path used to define the shader code
* It can be modified to trigger a new compilation
*/
public get shaderPath(): any {
return this._shaderPath;
}

/**
* Sets the shader path used to define the shader code
* It can be modified to trigger a new compilation
*/
public set shaderPath(shaderPath: any) {
this._shaderPath = shaderPath;
}

/**
* Gets the options used to compile the shader.
* They can be modified to trigger a new compilation
Expand Down