Edge blending shift#14
Open
colinbouvry wants to merge 4 commits into
Open
Conversation
added 4 commits
May 9, 2016 18:10
…lues between -1 and 1) Init index = 0
Owner
|
Thanks Colin, I'll have a look. Not sure if "shift" is the best name for it, though. "Offset" would sound more appropriate, but perhaps we should allow to set the texcoords directly and make sure the edge blending takes them into account. |
Author
|
I hesitated between shift and offset ! |
|
你好,我需要这种功能,可以加我微信17621807340,给你报酬 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello Paul,
I needed to shift edge blending to adjust easily
I added
mShader->uniform( "uShift", mShift + vec4(-mX1, -mY1, 1.f - mX2, 1.f - mY2) );because with this code it did not worked with edge
warp->draw(texture, m_oSrcArea);but with this, It worked !
warp->begin(); gl::draw(texture, m_oSrcArea, warp->getBounds()); warp->end();`
Perhaps we should add this method into WarpPerspective class ?
void setTexCoords( float x1, float y1, float x2, float y2 );Thanks for this nice block !