Skip to content

Updated cubemap reflections example#214

Merged
paweljarosz merged 1 commit into
masterfrom
191-updated-cubemap-reflections-example
Jun 29, 2026
Merged

Updated cubemap reflections example#214
paweljarosz merged 1 commit into
masterfrom
191-updated-cubemap-reflections-example

Conversation

@paweljarosz

@paweljarosz paweljarosz commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Removed unused assets, added more descriptions and explanations to the example, added screenshot and thumbnail, and modified the shaders a bit:

  • The old shader used normal directly, which is only correct for an unrotated, uniformly scaled model.
  • The old script pushed cameraPosition into the material every frame. That teaches an outdated pattern - Defold already gives the shader the view matrix, so the shader can derive camera position itself.
  • The material is now explicit about local vertex space, matching modern model examples. The shader uses Defold’s per-instance mtx_world attribute to transform the model.
  • Renamed envMap to env_map to match snake_case in other examples.

#191

@paweljarosz paweljarosz linked an issue Jun 29, 2026 that may be closed by this pull request
@paweljarosz paweljarosz self-assigned this Jun 29, 2026
@paweljarosz paweljarosz requested a review from Jhonnyg June 29, 2026 07:42
@paweljarosz paweljarosz merged commit 4538f2f into master Jun 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Updated Cubemap reflections example

2 participants