Skip to content

Added support to MatCaps light shader#644

Open
Micheus wants to merge 2 commits into
dgud:masterfrom
Micheus:mv/new-matcap-support
Open

Added support to MatCaps light shader#644
Micheus wants to merge 2 commits into
dgud:masterfrom
Micheus:mv/new-matcap-support

Conversation

@Micheus

@Micheus Micheus commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

This commit introduces MatCaps light shader support and reorganizes related modules. Several functions were moved to wings_image.erl for consistency, radio group options were added to wings_menu.erl, and shader light handling was extended to include MatCap. The View menu was updated to group display options under "Show" and redefine light modes with radio groups. New constants and uniforms were added to support MatCap textures, blending, and rotation. Additional shaders and textures were introduced to complete MatCap integration.

Files changed:

  • plugins_src/primitives/wpc_image.erl: Removed local functions and switched to wings_image.erl implementations.
  • src/wings_image.erl: Exported img_type/1 and nearest_power_two/1.
  • src/wings_menu.erl: Added radio group support and select_item/1.
  • src/wings_view.erl: Moved display options to submenu; redefined shader lights.
  • src/wings.hrl: Added MATCAP_MAP_UNIT constant.
  • shaders/standard.vs: Exported view info for matcap_light.fs.
  • src/wings_light.erl: Initialized MatCap variables and load_matcap_texture/1.
  • src/wings_shaders.erl: Added shader_light/1 and matcap_light program.
  • src/wings_view_win.erl: Added MatCap option with texture, rotation, blending; updated light toggle handling and sync with View shaders.
  • shaders/matcap_light.fs: New fragment shader to render MatCap light.
  • shaders/hemilight.fs: Renamed to hemi_light.fs for naming consistency.
  • textures/matcap/: Created subfolder with MatCap textures included in Wings3D distribution. All files are freely available online; readme.md added with more information.

NOTE:
Added support to MatCaps light shader. Thanks Flüfy Nũrbs

@Micheus

Micheus commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author
image image

This commit introduces MatCaps light shader support and reorganizes related
modules. Several functions were moved to wings_image.erl for consistency,
radio group options were added to wings_menu.erl, and shader light handling
was extended to include MatCap. The View menu was updated to group display
options under "Show" and redefine light modes with radio groups. New constants
and uniforms were added to support MatCap textures, blending, and rotation.
Additional shaders and textures were introduced to complete MatCap integration.

Files changed:
- plugins_src/primitives/wpc_image.erl: Removed local functions and switched
  to wings_image.erl implementations.
- src/wings_image.erl: Exported img_type/1 and nearest_power_two/1.
- src/wings_menu.erl: Added radio group support and select_item/1.
- src/wings_view.erl: Moved display options to submenu; redefined shader lights.
- src/wings.hrl: Added MATCAP_MAP_UNIT constant.
- shaders/standard.vs: Exported view info for matcap_light.fs.
- src/wings_light.erl: Initialized MatCap variables and load_matcap_texture/1.
- src/wings_shaders.erl: Added shader_light/1 and matcap_light program.
- src/wings_view_win.erl: Added MatCap option with texture, rotation, blending;
  updated light toggle handling and sync with View shaders.
- shaders/matcap_light.fs: New fragment shader to render MatCap light.
- shaders/hemilight.fs: Renamed to hemi_light.fs for naming consistency.
- textures/matcap/: Created subfolder with MatCap textures included in Wings3D
  distribution. All files are freely available online; readme.md added with
  more information.

NOTE:
Added support to MatCaps light shader. Thanks Flüfy Nũrbs
@Micheus Micheus force-pushed the mv/new-matcap-support branch from d73ad32 to ae25a71 Compare July 3, 2026 17:50
@Micheus Micheus force-pushed the mv/new-matcap-support branch from ae25a71 to b25c065 Compare July 3, 2026 18:14
@dgud

dgud commented Jul 6, 2026

Copy link
Copy Markdown
Owner

The problem with the release needs to be fixed.
The easiest would be to fix:
Change ["textures",""] to use a file extension filter like ["textures",".{png,bin}"]

But you need make a release and check the release that everything is included and that the release works.

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.

2 participants