Shader Chunk Migrations
Introduction
The PlayCanvas Engine's material shader chunk system is undergoing substantial changes in order to support a more flexible material system. Please see this page for more context.
In order to help users migrate their existing custom shader chunks, this page lists the changes made to chunks and organizes them by engine release (starting v1.51).
Chunk API Versions
The debug version of the Engine will report any API changes to the runtime console when it detects overridden chunks. For example:
Once an application's chunks have been updated to the latest API they must be flagged as such. For example, after updating a material's custom chunks to the latest engine release (say v1.55), specify this in the chunks object as follows:
material.chunks.diffusePS = '...';
material.chunks.APIVersion = pc.CHUNKAPI_1_55;
By doing this you will no longer see warning messages in the console.
Chunk changes
The following tables break down the chunk changes by Engine release.
Engine v1.55
Chunk | Changes |
---|---|
clearCoatNormalPS |
|
combineXXXX |
|
diffusePS |
|
diffuseDetailMapPS |
|
emissivePS |
|
lightmapSingleVert.js |
|
lightmapDirPS , lightmapSinglePS |
|
normalMapFastPS |
|
normalMapPS |
|
normalDetailMapPS |
|
clusteredLightPS |
|
endPS |
|
lightmapAddPS , lightmapDirAddPS |
|
lightSpecularAnisoGGXPS |
|
lightSpecularBlinnPS , lightSpecularPhongPS |
|
normalVertexPS |
|
specularAaNonePS , specularAaToksvigPS , specularAaToksvigFastPS |
|
startPS |
|