in enableGeometryBufferRenderer(),we have depthmap normalmap:
but how can I get the albedo map?
You can’t, the geometry buffer renderer can only generate depth, position, normal, velocity and reflectivity. With the prepass renderer, you can enable the ALBEDO_SQRT target, but you will get sqrt(albedo)
, not albedo directly. Also, it only works with PBR materials:
If you want to make it work for standard materials, you will have to write a material plugin to write to gl_FragData[PREPASS_ALBEDO_SQRT_INDEX]
(in which case you can also use the plugin to modify the PBR material to write albedo
and not sqrt(albedo)
, to avoid the multiplication when using the sampler).