P5.js: image() in WEBGL affected by the material/lighting conditions

Created on 25 Aug 2019  路  7Comments  路  Source: processing/p5.js

Nature of issue?

  • [x] Found a bug
  • [ ] Existing feature enhancement
  • [ ] New feature request

Most appropriate sub-area of p5.js?

  • [ ] Color
  • [ ] Core/Environment/Rendering
  • [ ] Data
  • [ ] Events
  • [ ] Image
  • [ ] IO
  • [ ] Math
  • [ ] Typography
  • [ ] Utilities
  • [x] WebGL
  • [ ] Other (specify if possible)

Which platform were you using when you encountered this?

  • [ ] Mobile/Tablet (touch devices)
  • [x] Desktop/Laptop
  • [ ] Others (specify if possible)

Details about the bug:

This is more of a question about what is expected. Should calls to image() in WEBGL mode use the current lighting and material conditions? Currently if you call image(img) it behaves similarly to texture(img); rect() which is to say that it takes on the current material and lighting state. Here is an example that shows this.

My instinct is that people will usually expect image() to appear as unlit, similar to 2D mode.

webgl help wanted

Most helpful comment

@stalgiag I think your instincts are correct, it should probably be unlit. Though now you should be able to call noLights() before a call to image to remove all lighting.

All 7 comments

hi @stalgiag , Can I work on this issue?

Hi @singhvisha yes definitely. But first we should decide what the behavior should be. What do you think?

@stalgiag I think your instincts are correct, it should probably be unlit. Though now you should be able to call noLights() before a call to image to remove all lighting.

Okay I think that this has been open long enough to draw any likely responses. I definitely agree that image() should be unlit.

This could be a good opportunity for contribution from new contributors interested in WebGL.

@stalgiag @aferriss
hi , Can I work on this issue?

@singhvisha sounds good!

Closed via #4128

Was this page helpful?
0 / 5 - 0 ratings

Related issues

montoyamoraga picture montoyamoraga  路  21Comments

ducklin5 picture ducklin5  路  27Comments

ScottGrogin picture ScottGrogin  路  36Comments

shiffman picture shiffman  路  56Comments

olleicua picture olleicua  路  22Comments