Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
107 stars 83 forks source link

Lighting on animated bumpmap sprites is randomized per frame #4771

Closed ChromeWisp closed 3 years ago

ChromeWisp commented 3 years ago

Problem description

When using a sprite with the bumpmapping effect on it which plays through multiple (even identical) frames of animation, the lighting on the bumpmapping is seemingly changed at random for each frame of the animation. In practice this causes a harsh, unintended flickering effect.

Attach a .c3p

BumpmapAnimLightBug.zip

Steps to reproduce

  1. Open the attached project.
  2. Note that the sprite with bumpmapping effect contains several identical animation frames.
  3. Run the project or in-editor set its initial animation frame to a different one and see its lighting drastically change for each frame of animation.

Observed result

Lighting "goes haywire", changing all over the place from one frame to the next despite no change to the effect's parameters.

Expected result

Lighting on a bumpmapped sprite would remain consistent across animation frames based on the bumpmap effect parameters.

More details

Affected browsers/platforms:

Firefox, Chrome.

First affected release:

No later than r241.

System details

View details Platform information Browser: Firefox Browser version: 88.0 Browser engine: Gecko Browser architecture: 64-bit Context: browser Operating system: Windows Operating system version: 10 Operating system architecture: 64-bit Device type: desktop Device pixel ratio: 1 Logical CPU cores: 6 Approx. device memory: (unavailable) User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0 C3 release: r241 (stable) Language setting: en-US Local storage Storage quota (approx): 2 gb Storage usage (approx): 423 kb (0%) Persistant storage: Yes Browser support notes This list contains missing features that are not required, but could improve performance or user experience if supported. Rendering multiple on-screen Layout Views is slow in Firefox due to bug 1163426 The element is not supported. A polyfill is in use. The Clipboard API is not supported. Some clipboard features may be unavailable. ImageBitmapOptions is not supported. Texture loading performance may be degraded. Determining input device capabilities is not supported. WebGL information Version string: WebGL 2.0 Numeric version: 2 Supports NPOT textures: yes Supports GPU profiling: no Supports highp precision: yes Vendor: Google Inc. Renderer: ANGLE (Intel(R) UHD Graphics 630 Direct3D11 vs_5_0 ps_5_0) Major performance caveat: no Maximum texture size: 16384 Point size range: 1 to 1024 Extensions: EXT_color_buffer_float EXT_float_blend EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic OES_texture_float_linear OVR_multiview2 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context Audio information System sample rate: 48000 Hz Output channels: 2 Output interpretation: speakers Supported decode formats: WebM Opus (audio/webm; codecs=opus) Ogg Opus (audio/ogg; codecs=opus) WebM Vorbis (audio/webm; codecs=vorbis) Ogg Vorbis (audio/ogg; codecs=vorbis) MPEG-4 AAC (audio/mp4; codecs=mp4a.40.5) MP3 (audio/mpeg) FLAC (audio/flac) PCM WAV (audio/wav; codecs=1) Supported encode formats: WebM Opus (audio/webm; codecs=opus) Ogg Opus (audio/ogg; codecs=opus) Video information Supported decode formats: WebM AV1 (video/webm; codecs=av01.0.00M.08) MP4 AV1 (video/mp4; codecs=av01.0.00M.08) WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8) Ogg Theora (video/ogg; codecs=theora) H.264 (video/mp4; codecs=avc1.42E01E) Supported encode formats: WebM VP8 (video/webm; codecs=vp8)
AshleyScirra commented 3 years ago

Ah, I don't think the effect is handling spritesheets correctly. It should be fixed in the next beta.