loadImage(...) and createGraphics(..., P2D) have different y-coordinates
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- java
- Domaine
- computer-graphics
Piste de recherche
Reproduisez le sketch fourni et comparez le comportement des coordonnées de texture de loadImage(...) avec celui de createGraphics(..., P2D), y compris le chemin BufferedImage et la sortie du shader. Commencez par ces points d’entrée et PGraphics, puis déterminez si la convention de coordonnées peut être rendue cohérente ; le travail est terminé lorsque les deux sources d’image produisent la même orientation y sous le shader.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Most appropriate sub-area of Processing 4?
OpenGL
Processing version
4.4.4
Operating system
MacOSX
Steps to reproduce this
PShader texCoordShader;
PGraphics pgP2D, pgDefault;
void setup() {
size(800, 400, P2D);
String fragShader =
"#ifdef GL_ES\n" +
"precision mediump float;\n" +
"#endif\n" +
"varying vec4 vertTexCoord;\n" +
"void main() {\n" +
" gl_FragColor = vec4(vertTexCoord.st, 0.0, 1.0);\n" +
"}";
saveStrings("frag.glsl", split(fragShader, "\n"));
texCoordShader = loadShader("frag.glsl");//, "vert.glsl");
pgP2D = createGraphics(400, 400, P2D);
pgDefault = createGraphics(400, 400); // Default JAVA2D renderer
pgP2D.beginDraw();
pgP2D.endDraw();
pgDefault.beginDraw();
pgDefault.endDraw();
}
void draw() {
background(0);
shader(texCoordShader);
image(pgP2D, 0, 0);
image(pgDefault, 400, 0);
}
Additional context
I'm working on a keystone library that is using a shader.
Because a image has different coordinates then a graphics created with P2D I need to know what the user is giving.
Not only that, it complicates the shader math way more then I would like.
To give an example:
The difference between those is P2D and default renderer (both in a sketch that is P2D).
Notice that the text is correct in both cases!!!
This does not just apply for PGraphics, using loadImage is different as well (cause also baked by a BufferedImage).
Having a mix of both of them really complicate things.
Complaining is easy however. I will dig into seeing if I can find a solution.
Would you like to work on the issue?
Trying...
- Langage dominant
- Java
- Étoiles
- 497
- Forks
- 183
- Merge moyen
- 4 h 39 min
- PR mergées (30 j)
- 3
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de processing/processing4
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
processing/processing4#1554 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
processing/processing4#1515 · 1 réaction ·
-
bug
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
processing/processing4#1573 ·
-
startup error Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
processing/processing4#1569 · 7 commentaires ·
-
Binaries under bin directory lack executable permissions for the snap and .deb packages for Linux Ouvertebug
processing/processing4#1567 · 3 commentaires · 1 réaction · 1 personne assignée ·
Toutes les issues de processing/processing4
Issues similaires
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Ouvertearea/plugin
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Add canonical URLs and a sitemap Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
apache/rocketmq-dashboard#5064 ·