pex-gl / pex-renderer

Physically based renderer (PBR) and scene graph for PEX.
https://pex-gl.github.io/pex-renderer/examples/index.html
MIT License
237 stars 16 forks source link

Consider renaming maps to textures #310

Closed vorg closed 1 year ago

vorg commented 2 years ago

So baseColorMap to baseColorTexture and normalMap to normalTexture etc...

pex-renderer -> map ThreeJS -> map Unity -> map Unreal -> map

ecs in Nodes -> texture Babylon -> texture cables.gl -> texture godot -> texture gltf -> texture

dmnsgn commented 2 years ago

It's a question of type = what it is (texture object) vs function = what it does (mapping to poly).

In 3D software world:

vorg commented 2 years ago

Also looking at modern engines bevy: texture machinery: texture tool3: map xenko/stride: map

This is not working :D 50/50

From code UX point of view the data / port / prop is type texture. Inside shader is a TextureMap (often shortened to Map). But that is always confusing in uniforms setup where i need uBaseColorMap: material.baseColorTexture (or was it Tex? or was it Map?)

I would say props should follow glTF as much as possible. Normalising everything to texture would simplify things.

vorg commented 1 year ago

WGSL having texture_2d uniform type is the winning vote for *Texture names.