vpenades 2 năm trước cách đây
mục cha
commit
d8358a411a

+ 6 - 2
README.md

@@ -91,8 +91,12 @@ Shaders are missing three features that I think are key to be able to do decent
 Vertex Morphing is not supported because it exceeds what MonoGame can do right now.
 Shadows and Glow might be possible, though.
 
-I'm not an shaders expert, so it's unlikely I'll do more work with the shaders, I'll try to add some
-documentation, though.
+I'm not an shaders expert, so it's unlikely I'll do more work with the shaders.
+
+Additinal documentation can be found here:
+- MonoScene.Runtime.Effects.PBR
+  - [Effects](src/MonoScene.Runtime.Effects.PBR/README.MD)
+  - [Shader Techniques](src/MonoScene.Runtime.Effects.PBR/Effects/Shaders/Techniques.MD)
 
 #### Credits
 

+ 1 - 1
src/MonoScene.Runtime.Content/README.MD

@@ -1,7 +1,7 @@
 #### MonoScene.Runtime.Content
 
 This project contains all the classes required to define a 3d model in memory,
-and eventually, to serialize it.
+and eventually, to serialize it (Most probably using ProtoBuffer)
 
 The architecture loosely replicates the architecture of the glTF standard,
 which is a feature rich model architecture.

+ 25 - 3
src/MonoScene.Runtime.Effects.PBR/Effects/Shaders/Techniques.MD

@@ -18,9 +18,7 @@ For those not familiar with T4 templates, here's a small example on how they wor
 
 ```c#
 <# for (int i = 0; i < 3; ++i) { #>
-
     Hello World <#= i #>
-
 <# } #>
 ```
 
@@ -62,4 +60,28 @@ might fail on missing files.
 Editing TT template files can be eye tearing,
 I suggest to install [Tim Maes T4 Editor](https://github.com/Tim-Maes/T4Editor)
 And then adjust the colors in `Visual Studio Menu > Extensions > T4Editor > Adjust Colors`
-to distingish between content code and template code.
+to distingish between content code and template code.
+
+#### What's left / missing
+
+I am not an expert shader expert and maybe some optimizations are possible. My objective
+has been to support as many glTF features as possible over performance.
+
+The three biggest missing features are:
+- Morph vertices, which I think are not possible with vanilla monogame.
+- Shadows
+- Glow effects
+
+
+Morph vertices are not just a simple tweening, under glTF it's even possible
+to have morphed and skinned vertices at the same time!
+
+Shadows would need additional shader code and more technique permutations.
+
+Glow would need another effect, similar to Unlit, to render the emissive textures
+over a render target, to be used at a later stage.
+
+
+#### Credits
+
+The shaders have been lifted and adapted to monogame from [glTF-Sample-Viewer](https://github.com/KhronosGroup/glTF-Sample-Viewer/tree/master/source/shaders)

+ 8 - 2
src/MonoScene.Runtime.Effects.PBR/README.MD

@@ -6,11 +6,17 @@ Extends Monogame with additional PBR effects:
   - UnlitEffect
   - PBREffect (abstract)
     - PBRMetallicRoughnessEffect
-    - PBRSpecularGlossinessEffect
+    - PBRSpecularGlossinessEffect (deprecated)
 
 These effects are designed, but not limited, to provide the neccesary shader features
 required by glTF format.
 
+In October 2021, Khronos deprecated SpecularGlossiness shader model in favour of extending MetallicRoughness, so
+the features of both shaders would need to be merged in a sort of über shader.
+
+Also, Khronos has been adding additional extensions that extend MetallicRoughness further, with additional specialised
+maps, making it even more complex for someone willing to support everything glTF can provide.
+
 #### Supported Vertex shader features
 
 ##### Rigid vertices
@@ -30,7 +36,7 @@ have limited constant buffers may fail to load models with a large number of bon
 Monogame's in-built SkinnedEffect has a limit of 72 bones, which by today standards
 it's a bit low.
 
-The recomendation is to use an independent constant buffer for bones.
+The glTF recomendation is to use an independent constant buffer for bones.
 
 ##### Morphed vertices