Comments (3)
Preferably without allocating twice the texture space, but that would require being able to split meshes by material (which would be useful, but hairy).
From discussion with Ralith on the Rust GameDev Discord server: Note that we don't have to entirely split meshes and use separate draw calls. We can just have multiple bound textures, and store in the vertices an index of which texture set, if any, to use, like so:
- 0 = use vertex color
- 1 = use (reflectance atlas 0, constant emission zero)
- 2 = use (reflectance atlas 1, emission atlas 1)
My other idea prior to this was to indirect through a table of texture coordinate offsets, so that the emissive data could be written to the same texture in a different location; that would have the advantage of fewer textures and supporting things like defragmenting the texture atlas, but is likely to cost more.
from all-is-cubes.
As of commit 2e9f6c6 we have a plan for how to allocate textures as above, by having the mesher tell the allocator what Channels
are needed.
Next steps:
- Have the allocators actually allocate separate textures (and designate them in the vertex coordinates)
- Implement emission in the shaders
- Have the mesh generation switch to textures even for simple blocks if there is an emission value (this way, we don't need two vertex colors).
from all-is-cubes.
As of commit a2fd653, emission rendering is active. It is not yet implemented in the glTF export, but since texturing is still generally a work in progress there, I'm going to call this done.
from all-is-cubes.
Related Issues (20)
- Bloom rendering fails / "Feedback loop formed between Framebuffer and active Texture" HOT 3
- Save memory by discarding CPU-side mesh data
- Finish `GridArray` migration HOT 1
- Migrate content generation to be able to use transactions HOT 1
- Correctly render inner transparent voxels in meshes
- Mesh face colors
- Handle transaction errors HOT 1
- Text rendering HOT 4
- Optimize evaluated voxel data layout (struct-of-arrays, palette…)
- Improve mouselook/pause UX and state transitions
- Mousedown/mouseup/hover interactions
- Multiblocks, take 2
- Revert using `cargo doc --no-deps` when Rust 1.76 is released HOT 1
- Choose a new logging backend
- Add timeout to render tests HOT 1
- Block face colors are not being taken into account by light propagation
- Batched notifications HOT 1
- Instanced block rendering HOT 4
- Antialiasing on webgl2 panics
- Asynchronous chunk mesh building HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from all-is-cubes.