update method
Implementation
WebGLShaderCache update(Material material) {
final vertexShader = material.vertexShader;
final fragmentShader = material.fragmentShader;
final vertexShaderStage = _getShaderStage(vertexShader!);
final fragmentShaderStage = _getShaderStage(fragmentShader!);
final materialShaders = _getShaderCacheForMaterial(material);
if (materialShaders.contains(vertexShaderStage) == false) {
materialShaders.add(vertexShaderStage);
vertexShaderStage.usedTimes++;
}
if (materialShaders.contains(fragmentShaderStage) == false) {
materialShaders.add(fragmentShaderStage);
fragmentShaderStage.usedTimes++;
}
return this;
}