Scirra / Construct-feature-requests

A place to submit feature requests and suggestions for Construct.
https://www.construct.net
11 stars 1 forks source link

Add limited support for custom vertex shader only for effects with direct-3d-render enabled #180

Open MikalDev opened 6 months ago

MikalDev commented 6 months ago

Reviewed guidelines

Checked for duplicate suggestions

Summary

For only the effects with opt-in direct rendering with 3D objects, add limited support for custom vertex shaders. In conjunction with a direct rendering fragment shader, this will allow for great 3d rendering effects like snow shaders, lighting, height based fog, etc.

For a big impact, only limited custom vertex support is needed:

Limit this to only opt-in direct rendering, so the impact will be contained and focused where more advanced effect designers will work.

Possible workarounds or alternatives

There are no good existing SDK based solutions.

Proposed solution

Add another set of files to effect addons which would be the source for the vertex shader. When rendering a 3d instance (3DShape and other 3D object types) and an effect with direct 3d rendering is applied, if a custom vertex shader is included, use this shader instead of the default vertex shaders.

Why is this idea important?

This will allow for great 3d rendering effects like snow shaders, lighting, height based fog, etc. so 3rd party developers can push the 3D capabilities further, which is not in the C3 roadmap, but some developers would like to use. So, good way to do a change which allows more 3D capabilities without C3 engine itself focusing on larger 3D development.

Additional remarks

This is in relation to the other request for changing the vertex shader, but approached in a different more flexible way.

146

MikalDev commented 6 months ago

Example images for lights, snow shader, height fog shader in C3 are in #146