Code Monkey home page Code Monkey logo

artgl's Introduction

Hi there ๐Ÿ‘‹

artgl's People

Contributors

mikialex avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

artgl's Issues

VAO validation should consider shader usage

Consider this case:

I have geometry with position, normal

first shader only use position, then the vao created is not include normal binding

the second shader use position and normal, when use vao, it cant get normal buffer. its a bug

Support multi function declare / other function depend in ShaderFunction

Sometimes we need declare more than one function in one ShaderFuntion for convenient., or one shaderfunction can depend others. So ShaderFunction maybe renamed to ShaderComputation, for repersenting a kind of, a wrap of computation, not just the form of function.

PlanA:

All functions should be parserd, extract their meta info like before, this seems not difficult. We use the last declared function as computation entry. The function above can be used in bellow.

PlanB:

As before, we declare several shader-computation, add dependency resolve mechnsim: the other computation depends, or even const value depends.


In shader souce codegen, all function is convert to be unique with guid prefix, which maybe need add simple but not robust string repalce logic.

Seems PlanB is promisable.

It is legal to have the same uniform defined in different shader stages.

https://www.khronos.org/opengl/wiki/GLSL_:_common_mistakes

Uniform Names across shader stages
It is legal to have the same uniform defined in different shader stages.

When you call glGetUniformLocation, it will return one location. When you update the uniform with a call to glUniform, the driver takes care of sending the value for each stage (vertex shader, geometry shader, fragment shader).

This is because a GLSL program contains all of the shader stages at once. Programs do not consider uniforms in a vertex shader to be different from uniforms in a fragment shader.

Support ShaderTexture( sampler) as first class shader node in shader graph

ShaderTexture is not a shader node, but create texture fetch node. This leads Its impossible fetch texel in shaderFunction directly. Some ShaderFunction compute need sample texture quite often, but we cant pass sampler object to it.

We should support ShaderTexture( sampler) as first class shader node in shader graph. This has one majoy issue to solve: If we allow user write texture2D in their shader function, this will affect glsl version switch impl. Another parser should add to extract texel fetch info in shader source and replace with desired.

Auto FBO memory optimization in rendergraph

In multi pass render, the fbo rendered and used in pass before maybe could be used in following left pass. As render graph system can infer which fbo's content in which pass stage is not need be keep, and can also find what kind of target need in left pass, we can design a fbo memory optimzaition sys for auto handle this.

Some fbo's content need forced be keep such as temperal ping pong buffer. Additional api related to this need to consider.

Design a mechnism for sharing uniform inputnode between the shader unform provider

Obviously global uniform map in engine is a bad design. Engine hold a camera that maintain the global map is a bad design too. As we cant share the uniform input node between the uniform decorator, so Its a workaround.

Camera should be a shadergraph decorator that decorate the vertex graph with it s projection matrix. But the uniform should could be used by other decorator/ provider. Maybe a solution is design a shared uniform map in shadergraph, just like engine's, but not as global as that.

To decoupling the name resolve issues. We can just define the related name on their static porperty. KISS

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.