Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

3D object rendering #11

chronos-ctrl started this conversation in General
Discussion options

🔘 Request type

General feedback

🔘 Description

Hello,

Is it possible to render a 3d object using ShaderFlow ? I can see from the code that you only consider (x, y) as vertices, also, I don't see any camera projection matrix in the code. So I assume it is only for 2 objects. Correct me if I'm wrong.

Best,

You must be logged in to vote

Replies: 1 comment

Comment options

Good question! I'll try to be brief as this eventually will (and should be) in the docs 😅

We absolutely can render 3D stuff in shaderflow, but not in the "traditional"/blender meshes sense. The scope of the project is rendering a fullscreen rectangle (the two coordinates you noticed) with everything done in a fragment shader (also the reason for the lack of camera matrices, no need in this case)

It's very similar to what shadertoy.com offers, in fact, these most popular demos in the link are often 3d scenes. They use a technique called ray marching, where you mathematically define the scene based on distances to project the rays

There's more resources in the Camera.py file of how the modeling works, but if you run shaderflow raymarch main scene* and hit 3, you can walk around with WASD and the mouse as below (Tab for dev menu):

*: Run From source, as I don't bundle demo scenes on pypi/releases)

image

See how the uniforms pipeline at the left contains the camera position, basis and aux parameters :)

Let me know if you have any further question, will move the issue to a discussion!

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Converted from issue

This discussion was converted from issue #10 on January 14, 2025 20:13.

AltStyle によって変換されたページ (->オリジナル) /