Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Lodea

Pages: [1]
1
Graphics / Re: TextureRect sometimes rendered wrong
« on: June 06, 2022, 09:59:50 pm »
This can happen if your sprite isn't placed at integer pixel coordinates, pixels outside of the texture rectangle can bleed over due to floating point errors.

There's other fun that can happen such as mip maps for non-power of 2 texture regions, but that's probably not happening here (you'd need to shrink the sprite for it to happen).

Thanks, I tried flooring the position and it seems to work perfectly so far. Though I would like to have a non-int position. Is there a way to fix this without sacrificing rounding the sprite's position?

2
Graphics / Re: TextureRect sometimes rendered wrong
« on: June 06, 2022, 03:02:15 pm »
is the texture set to smooth? if it is, try switching it off
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Texture.php#a0c3bd6825b9a99714f10d44179d74324
I tried switching all the smooth textures off but it's still doing that..

3
Graphics / TextureRect sometimes rendered wrong
« on: June 04, 2022, 05:05:52 pm »

I have this problem that once in a while the TextureRect I'm trying to display is rendered with artifacts from the neighboring pixels. (as can be seen in the top-left corner of the sprite)
I checked and the TextureRect itself only includes the relevant pixels.
The sprite is scaled in the x axis by a factor of -1 (to make it horizontally flipped) and rendered on a 2x zoomed in View, maybe it's related for some reason, idk.
Thanks for the help in advance.

4
General / Trying to get pixe colors of textures
« on: August 06, 2018, 10:47:20 pm »
SFML community, hello.

I'm trying to distort an image (not only scale or rotate).
I thought to do so by getting the colors of pixels of a texture and print them to the screen one by one, though I couldn't figure out how to get the colors of pixels from a texture.
I'd love to know if there's a way to do so, or even preferably if there's another, better way of drawing a distorted image to the screen.

Thanks in advance.

Pages: [1]