openframeworks / openframeworks/openFrameworks

ofMaterial and floatingPointImageExample

Open
#7,389 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

With Linux it works without ofMaterial, but for Emscripten I need to set:

	material.setShininess(120);
	material.setSpecularColor(ofColor(255, 255, 255, 255));
		material.begin();
		ofScale(1, -1, 1);
		ofRotateXDeg(60);
		ofTranslate(-img.getWidth() / 2, -img.getHeight() / 2, 0);
		ofSetColor(255);
		ofEnableDepthTest();
		mesh.draw();
		ofDisableDepthTest();
		material.end();

for getting a similar result.
So I wonder, if there is kind of an ofMaterial "preset" that works for Linux and can be enabled for Emscripten?
(at least the 6th model from 3DModelLoaderExample is affected from the same behaviour, too)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the difference in floatingPointImageExample on Linux and Emscripten, then compare the material and drawing setup shown in the issue with the affected 3DModelLoaderExample model. Done means the examples produce comparable results across both targets without requiring an Emscripten-specific ofMaterial setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.