Giter VIP home page Giter VIP logo

dx11renderer's People

Contributors

ivokabel avatar

Stargazers

 avatar  avatar

Watchers

 avatar

dx11renderer's Issues

Simple shadow map

Study materials:

TODO:

  • Directional lights
    • testing scenes
    • single light
      • Render scene to extra buffer before final rendering
      • ...
      • Create shader (temporarily within scene)
      • Use the new depth map shader instead regular ones
      • Integrate depth map shader to a better place? Into lights? Or just store the shader next to regular ones and use it when asked for?
      • ...
    • multiple lights
    • ...
  • Point lights
    • single light
    • multiple lights
    • ...

Metalness – normal map

Study Materials

To Do

  • Load texture
    • Texture
    • Scale
      • Upgrade tinygltf to 2.5.0
      • Access material properties directly
      • If needed, update material/texture architecture
      • Add scale
        • Load within NormalTexture
        • Use scale
  • Load tangent vector
  • Compute modified normal
  • Testing scenes
    • Get
    • Generated tangent test problem: May be caused by different handedness somewhere. Try to fix alongside the handedness switch: #49

Extras

  • Use modified microfacet normals #46

Test3

how do i make this "in progress"?

PBR metalness material

Related to #10

  • Workflow switch & metallness shader stub
  • Add metal/roughness texture
    • Texture
    • Compound const factors: LoadFactor() + LoadTexture()
  • Implement brdf: PBR metalness, Advanced mat
  • Multiply const factors within shader (do not pre-multiply)
    • Base colour
      • Testing scene: three spheres – texture/factor/texture*factor
      • Remove pre-multiplication
      • Pass constant to shader
      • Add multiplication in shader
    • Metal&rough

Extras in #45

...D3DX_IsNan

Add post processing

  • Analysis: PS or CS?
  • Add 2nd pass
    • Optional (on key press)
    • Low-level prototype:
      • Texture/RTV/SRV
      • Samplers, ...
      • Shader infrastructure
      • DrawFullScreenQuad
      • Shader op: no change & simple test operation
    • Higher-level wrapper: PassBuffer
  • Implement image processing
    • Bloom
      • Downscale
      • Horizontal blur
      • Vertical blur
      • Composition: orig + blurred
    • Tone mapping?
    • FXAA?
  • MSAA support
  • Optional: Downscale flickering problem

PBR specularity material

  • diffuse
  • specular
    • Default zero texture (when specularity texture is not available)
    • Specular texture
    • Refactoring
    • Screenshot
  • reflectance?
  • glossiness/roughness

Linear workflow

Related to #11

  • Gamma removal
    • glTF textures
      • Metalnes material: glossy coating in non-metal is too bright? just for ambient light??
    • Direct textures
    • Pre-multiply textures by const color factors (only if not handled directly within the shader)
    • Per-vertex values?
  • Gamma restoration
    • RTV auto conversion?
    • Final shader step?

Resources:

Testing:

  • Simple shading: sphere, simple material, simple lighting
  • Constants
    • Vertex color blending
    • Rough/metal spheres under pure ambient light (various intensities: 0.25, 0.50, 0.75?, 1.00)
    • Vertex metalness parameters blending
  • Loaded from Textures
    • Quad with gradient (linear in sRGB) under pure ambient light (various intensities: 0.25, 0.50, 0.75?, 1.00)
    • Sphere with pure diffuse texture with horizontal black-white waves, just directional light
    • ...
  • glTF data
    • Rough/metal spheres with various light types
  • Per-vertex colors blending

Switch glTF handedness

  • Switch handedness
  • Check generated tangent test problem -- may be caused by different handedness somewhere.

Point lights

  • Directional lights → point lights
  • Requires computing light vector in PS
  • Nice "fireflies" animation

Scene loader

LoadHardwiredScene() wrapper

  • Simple wrap
  • Dynamic scene objects data allocation
  • Parametrized per-scene lights
  • Different scenes: planets, debug sphere, earth
  • Dynamic lights count (max light count, e.g. 16; for testing materials)

File loader

  • File loader analysis: tiny gltf
  • Build a simple example
  • Process the data
    • First data touch (descend)
    • Mesh geometry
      • Buffers, buffer views, accessors, and shit...
      • Positions
      • Indices
      • Wrap data acquisition
      • Load into SceneObject
        • Rename SceneObject to ScenePrimitive
        • Directly to ScenePrimitives
          • positions
          • indices
          • topology
          • normals
          • tex coords 0
      • Non-indexed geometry?
      • Implicit normals if not available?
    • Hierarchy
      • SceneNode with primitives
      • Transformations
        • Individual
        • Matrix
      • Children
        • Load
        • Animate
        • Render
      • Switch handedness: #49
      • Optimization: shared ScenePrimitives?
      • Optimization: shared SceneNodes?
    • Materials
      • Separate from scene primitives
      • Constant diffuse
      • Texture
        • Image
        • Multiply with const factors
        • Convert sRGB->linear->sRGB
        • Sampler
        • texCoord
      • PBR metalness #11
      • PBR specularity #28
    • Bugs
      • Degenerated geometry: 32b indices, matrix trafos
      • Missing geometry
  • Various
    • Rotate the whole scene instead of root objects
    • Allow transformations of loaded scenes
  • Separate to a file/class?
  • Licence
  • Command line args #51

Traditional material?

  • Only if needed due to content?
  • Use: diffuse, glossiness, specular, emission, ...
  • Maybe: normal/bump map,...
  • Ignore: AO, gradient...

Separate scene objects

  • Analyse usage (on the fly)
  • Wrap:
    • Geometry (vertices, indices, topology)
    • Animation
    • Geometry drawing
    • Point light proxies
    • Per-object CB
    • Texture
    • Test multiple instances

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.