vizoogmbh / u3m

Unified 3D Material (U3M)
http://www.u3m.info
BSD 3-Clause "New" or "Revised" License
40 stars 20 forks source link

Texture channel packing #9

Closed ELSECorp closed 4 years ago

ELSECorp commented 5 years ago

It would be good for renderers where texture sampling is expensive to be able to specify channels when assigning textures to shader parameters, meaning an RGB texture could contain (for example) Roughness in R, Specular in G, Metalness in B.

ReinhardOnVizoo3d commented 5 years ago

I think it could be done by just adding a "channel" parameter to the image node:

"roughness": { "constant": 0, "texture": { "factor": 1, "offset": 0, "image": { "dpi": 1000, "height": 11.1195, "path": "textures/Example_0.9_RSM.jpg", "channel": "R", "repeat": { "mode": "normal", "rotation": 0 }, "width": 12.1759 } } },

this way several maps could share the same image.