InitialPrefabs / UGUIDOTS

Converting UGUI to be DOTS compliant
MIT License
114 stars 12 forks source link

Create common shader effects #26

Open psuong opened 4 years ago

psuong commented 4 years ago
psuong commented 4 years ago

I think one of the issues with this is trying to figure out how to update all the material property blocks. A couple of things I can think of is:

  1. By default all rendered elements should have a material property block. A small issue with this is that visually - it will be hard to see how UI shaders are applied in editor time until I figure that out and instead of a temporary material property block, you now have a continuous array of material property blocks. The primary issue is that - not all material property blocks need to be there if not all render elements need to be change. a. If there are only visual changes then the material property block can just be updated includes:
    • Translation/Rotation
    • Color Updates
  2. Create custom material property params a. The issue with this is that if you have multiple buffers and multiple systems to read the buffers and apply it a temporary material property that is only created and used in the OrthographicRenderFeature.

I'm leaning towards option 1 since I can deprecate systems which update the translation/rotation/color. I think to reduce the number of material property blocks there are it would be a good idea to map reduce common materials and ones with custom properties should have their own. I'll have to figure out how to do it 🤔

psuong commented 4 years ago

translation-shader

Added a basic translation shader - need to try and mimic the default UI Shader and display the texture properly

psuong commented 4 years ago

translation Added stencil override support so that the new unlit shader looks similar to Unity's.

psuong commented 4 years ago

fill-vertically fill

Vertical/Horizontal fill shaders added

psuong commented 3 years ago

fill

Added support for radial fills :)

psuong commented 3 years ago

fill

All fill options currently available. (Axis fill + 360 radial fill)