Skip to content

Interpolate control map blend value #679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Xtarsia
Copy link
Collaborator

@Xtarsia Xtarsia commented Apr 21, 2025

Modifies the main shader to interpolate the blend value.

Improves painting of curves with the overlay spray tool

Changes the spray tool behaviour to act independantly of the base texture, by always increasing blend value, and setting overlay regardless if the base is the same.

Also made some other small fixes.

Helps a bit with #351

image

@Xtarsia Xtarsia added the shaders Shader development label Apr 21, 2025
@Xtarsia Xtarsia self-assigned this Apr 21, 2025
@TokisanGames
Copy link
Owner

  • The Spray is noticeably less blocky now. I don't remember seeing it so blocky in main as it is now. I remember it blending much better than it does now. Maybe it's the new demo texture. 🤔

{E9D19F62-6C65-4197-8555-474EDFFD6E11}

When both sides are Painted, we used to be able to smoothly:

  • Spray rock into Painted grass
  • Spray grass into Painted rock, then
    • Ctrl remove Sprayed grass
    • Spray rock into Sprayed grass

Now, the last one is chunky. Spraying rock back after having sprayed grass into rock. Maybe it's the same as before but seems much worse because the other ones are improved.

{1FAC720F-FE34-40DD-9383-D595D5F860E0}

I'm able to get this by:

  • Painting rock
  • Spraying grass
  • Painting grass

(auto_slope * 2. * ( TANGENT_WORLD_MATRIX[1].y - 1.) + 1.)
- auto_height_reduction * .01 * v_vertex.y // Reduce as vertices get higher
, 0., 1.) +
float(!auto_shader) * float(control >>14u & 0xFFu) * 0.003921568627450; // 1./255.0
Copy link
Owner

@TokisanGames TokisanGames Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment needs to be in the shader on the first use of 0.003921568627450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shaders Shader development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants