Git Product home page Git Product logo

pathosengine's Introduction

Hi, I'm a graphics engineer at Unity. Formerly I was a game engine programmer at various game studios.

This is my personal account mainly to toy with graphics programming in my free time and does not contain any works at office.

Here's some images rendered using my toy projects. You can see more in my github.io or by opening individual repositories.

Software raytracer

OpenGL real-time rendering

DirectX 12 real-time rendering and raytracer

pathosengine's People

Contributors

codeonwort avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pathosengine's Issues

Fix built-in CPU profiler

Counters should be tracked per thread but I'm using CPU core numbers for indexing in some places. This is definitely wrong and sometimes causing a program crash.

PIX_example

Also, counters are just being printf'd. Visual rep. is required, like PIX on Windows does in above image.

Fix multi-threading architecture

multithreading_architecture

This is what I wanted when I was implementing render thread, but currently the engine is not working like this.

Currently main thread tick is somehow bound at glutDisplayFunc's frequency, and I don't remember why I did this??? :(


Old render thread PR: #24

Fix CPU profiler

Test dump

[Frame 257]
main thread
    WorldTick: 1 ms
        FlushLoadedAssets: 0 ms
        UpdateCurrentWorld: 0 ms
        CreateRenderProxy (MainScene): 1 ms
        CreateOverlayProxy: 0 ms

Render Thread
    Present: 0 ms
    Frame 257: 0 ms
        ExecuteCommands: 0 ms
        DestroyRenderProxy: 0 ms
        WaitForGPU: 0 ms
    Frame 257: 1 ms
        ExecuteCommands: 1 ms
        DestroyRenderProxy: 0 ms
        WaitForGPU: 0 ms
    Frame 257: 20 ms
        ExecuteRenderer: 6 ms
            UpdateUniformBuffer: 0 ms
            RenderPreDepth: 0 ms
            RenderCascadedShadowMap: 0 ms
            RenderOmniShadowMaps: 0 ms

Almost all counter items are estimated to 0 ms. Though my clock resolution is in milliseconds, there's no way these counters take less than 1 ms.

Fix volumetric clouds

2022_09_22_rc1

This is current state of my volumetric clouds, implemented several years ago, but it never worked as I wanted. This is just a result of random luck from random math on volume noises.

Currently every aspect of cloud rendering isn't working as expected:

  • Weather map's cloud coverage and cloud type
  • Contribution of base noises and erosion noises to cloud shapes
  • Density gradient for cloud coverage
  • Cloud lighting
  • Raymarching

It's time to fix it.

fix_cloud_1
fix_cloud_2

Fixed things so far:

  • Cloud coverage and cloud type works as intended.
  • Base noise determines overall shapes of clouds and erosion noises only contribute to small carving.
  • Density gradient works as intended.
  • Cloud lighting does not result in random number.
  • Adaptive raymarching.
  • Banding artifacts (thanks to NVidia STBN).

Now temporal reprojection remains but it's a different situation than TAA. I can't derive exact world positions of prev/current cloud particles that first-hit camera rays. Fast temporal reprojection without motion vectors looks promising.
-> I reviewed the paper but it uses too much memory :/ I'll need 25 textures of the scene size for 25 different offsets. Can't alias them because the merge kernel accesses all of them.

Remove dev branch

Remove dev branch and use master as an usual work branch.
Make a release branch to stash stable versions.

Images for Wiki 2

~2021

Pathos_2020_01_29

obj_test

light_scattering

RC1_wip

RC1_wip2

pathos-testscene-2020-12-31

2022

2022_09_22_lightroom
Area light test

2022_09_22
Old demo world with new lighting

2022_09_22_rc1
Old RC1 world with new bloom

2022-10-06-15-56-11_shot0
Yet another GLTF asset

tiny_obj_loader version update

Latest version of syoyo's tiny_obj_loader is moved from 0.9.x to 1.0.0.

Problem

  • A shape can be consisted of several faces. Each face can have its own material.
  • My engine converts this shape into a Geometry, but a Geometry is paired with only one Material.
  • So if a shape uses several materials I can't deal with this.
  • Solution: not shape -> geometry, but face -> geometry? But there is too many faces! Millions of buffers = unnecessary tremendous overload.
    • Each buffer should hold all vertices/normals/texcoords. Somehow distinguish the faces and apply different materials!
attrib {
  vector<float> vertices
  vector<float> normals
  vector<float> texcoords
}

index_t {
  int vertex_index
  int normal_index
  int texcoord_index
}

mesh {
  vector<index_t> indices
  vector<uchar> vertices_per_face
  vector<int> materialID_per_face
}

So, I have to group faces by their corresponding material IDs and convert each group a Geometry!
No, one Geometry for one shape. I only need to create separate index buffers for each material ID.

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.