Comments (3)
Very rough concept for the runtime classes (names TBD):
- Class ShaderModule: Contains defines, uniforms that are colors, that are floats, and textures, all identified by string ids. Several modules can share their uniforms. E.g. if two modules used at the same time both use baseTexture or shininess, then both get the same value set by the user.
- Can have children, which are just ShaderModules themselves. Nested arbitrarily deep. Activating a child means necessarily activating the parent.
- Can have requirements for specific vertex attributes. Such modules will be activated by loading code directly.
- Can be marked as non-UI; used by the engine depending on scene settings (this might be used for light settings or cube maps or what have you)
- Class ShaderBase inherits from ShaderModule
- Adds the actual shader files to use.
- Class ShaderInstance consists of a ShaderBase and set of ShaderModules (that must all be descendants of that ShaderBase). Calculates effective used set of uniforms, vertex attributes, and preprocessor defines.
- XNALara Shader specifically for loading XNALara files:
- Contains a ShaderInstance to use
- Contains mesh groups to which this ShaderInstance applies
- Contains mapping from generic_mesh parameter values to shader parameters
- Used only during loading, ignored by rest of system.
Possible expansion if necessary:
- ShaderModuleGroup: Can be a child of a ShaderModule. Has a name and a set of ShaderModules. The shader modules are considered mutually exclusive by default.
from gllara.
Loading from existing scene files:
- Use the XNALara Shader data to map the existing shader string
Saving scene files:
- Add array of selected shader modules to GLLItemMesh; use existing shader name as shader base (or new field for this?)
Actually not that difficult.
UI needs to be adapted for this, but having nicer UI is part of the point of all of this.
from gllara.
Should probably also add a way for models to specify which texture coordinate goes with which texture while we're at it.
from gllara.
Related Issues (20)
- Render to file has wrong default size on Retina displays
- Refactor the model parameters
- Hierarchical optional items don't show up properly when sub-parts are invisible at start
- Write release blog post for 0.2.7 (or 0.2.8)
- Filter bones HOT 1
- QuickLook for models
- QuickLook for scenes
- QuickLook for poses
- Constraints only enforced on saving
- "Look at camera" command
- Stop doing "select all" on bones
- Look into automatic window tabbing
- App/file extension? HOT 2
- Switch to Metal HOT 1
- exporting
- Rewrite SkeletonDrawer to use bone matrices directly
- Implement glTF HOT 4
- Load FBX files
- Convert all remaining classes to Swift
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 gllara.