#Gradient alpha clipping doesn't work properly

1 messages · Page 1 of 1 (latest)

tawny thistle
#

OK so I'm using a conical gradient for customizable aoe cones as decals.

I made an alpha clipping decal shader, bla bla. The problem is the the edges of the cones at most angles are very jagged and shitty.

I would assume this means the gradient linearity is imprecise. Right? Could it be something else?

The image is 2k res and it looks good to me, but I can't tell by eye.

Also, for some reason, alpha clip 0.5 doesn't show a half circle, but that's probably me being an idiot, not knowing how to make a proper gradient. The bigger issue here is is the harsh edges.

So what do you think?

#

Fixed. Fucking image compression

tawny thistle
#

Seeing how disgusting image compression can be...

How do I know which is the least compressed and what are the various levels of compression of all the other options?

hushed trellis
#

Also, color space the image is saved in and read as matters a lot

#

If you save as sRGB / gamma and read as non-color / linear or vice versa, you get a nonlinear gradient so every value will be shifted one way or another
If you save as sRGB and read as sRGB, precision will be nonlinear so some parts of the gradient will get crunchy

tawny thistle
#

The way you said it with the gradients being shifted...right, but the gradient extends in a clockwise fashion

#

That just means I would get an angle I don't want by clipping

#

But it was also crunchy and jagged

#

When I turned it into rgba float, it was perfectly crisp

hushed trellis
#

Confirm that by compression you don't mean pre-import image compression?

hushed trellis
# tawny thistle But it was also crunchy and jagged

It can mean both
sRGB by remapping a limited amount of data to the gamma curve causes some parts of the gradient to lose bit depth (and another part to gain more)
Swapping to a higher bit depth texture format could mitigate the issue, but it wouldn't be the fix

tawny thistle
#

Didn't know how to make it so I made it with css code, opened it localy in a broswer then saved the img

#

So it's not like I made it in some software where I would know

hushed trellis
#

Then I expect it was converted into sRGB in the process

#

The way I'd do it generate the texture in Blender, then bake to non-color image (or render without any color conversion) and save as non-color png

#

Gimp and Photoshop also give you manual control over the color profile and saving, and maybe let you make that kind of gradient out of the box, but I'm not familiar with doing it that way

tawny thistle
#

I use krita

#

I know I can do that in krita ofc

#

It's just that I didn't really know how