Skip to content
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

"isExternalTextureRetina" display default #440

Merged
merged 19 commits into from Aug 18, 2022

Conversation

ggcrunchy
Copy link
Contributor

A couple people were testing a plugin of mine and noted that it would produce different results with the pixelate filter.

I looked into it, and will quote from my response to one of them in summary:

"Okay... external textures (Bytemap, etc.) seem to be classified as retina. This affects the content scaling uniform.
https://github.com/coronalabs/corona/blob/master/librtt/Display/Rtt_TextureFactory.cpp#L577 (the true).
So, it goes through this path https://github.com/coronalabs/corona/blob/master/librtt/Renderer/Rtt_Renderer.cpp#L625 versus the other, and indeed that's the relevant part: https://github.com/coronalabs/corona/blob/master/librtt/Display/Shader/kernel_filter_pixelate_gl.lua#L31"

This PR adds a new value for display.setDefault(), "isExternalTextureRetina", that may be set to alter the default behavior.

This is a very slight modification of the original test, just switching out a quick-and-dirty image for the original assets:

pixelateBytemapTest.zip

As is, it will demonstrate the problem. Uncommenting the line that sets the default to false will fix it.


Unrelated, I piggybacked the removal of some // STEVE CHANGE comments I left behind in a previous PR.


(The previous attempt got pretty botched by me trying to sync my fork and squash commits. Possibly salvageable, but I figured a new one would be the saner way.)

ggcrunchy and others added 19 commits February 7, 2019 17:09
…nd buffer and assignment logic

Next up, prepare details from graphics.defineEffect()
…from Program

Slight redesign of TimeTransform with caching (to synchronize multiple invocations with a frame) and slightly less heavyweight call site
Err, was calling Modulo for sine method, heh

That said, time transform seems to work in basic test
Fixed error detection for positive number time transform inputs

Relaxed amplitude positivity requirement
Maintenance Revert Test
My mistake adding back changes made
@Shchvova Shchvova merged commit 84bc4f3 into coronalabs:master Aug 18, 2022
@sekodev
Copy link
Contributor

sekodev commented Dec 7, 2022

@ggcrunchy can you also add this to documentation with version information so it doesn't go undocumented?

I don't know if this also needs to be on display.getDefault() as well as display.setDefault() but here are the links :)

@ggcrunchy
Copy link
Contributor Author

@sekodev Yeah, I need to get around to it. Also the new blur effect and sprite stuff.

@ggcrunchy ggcrunchy deleted the ExternalTextureRetina branch December 19, 2022 21:51
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.

None yet

4 participants