Skip to content

Use of clamp in shaders

Originally apart of this thread #7484 (comment 1476560107) which talked about using post-processing to handle AA, the topic that the edgeAA shader wouldn't work because 'clamp' is no longer supported.

EdgeAA

I split this thread out so it can be talked about here instead of containing more noise in the originating thread.

@psi29a

Shouldn't it be trivial to change 'clamp' to 'clamp_to_edge' for them?

@AbduSharif

Would be really useful, people do actually use the shader and will use it (because they're unaware of the depreciation happened and nothing says so either).

@AnyOldName3

There was some discussion here !3140 (comment 1434917142) about whether it was better to:

  • emit an error to the log saying clamp was removed, and being automatically switched to clamp_to_edge.
  • emit an error to the log saying clamp was removed, and advising the user to look for an updated shader without automatically fixing it.
  • do what we currently do where it just dies and doesn't mention anything user-friendly about how to fix it.

It only came up after the MR was merged, and then we forgot about it instead of promoting it to an issue or agreeing that what got merged was the best approach.

Edited by psi29a