Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (524)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Phong Shading giving a black line  (Read 2131 times)
0 Members and 1 Guest are viewing this topic.
Offline orange451

JGO Coder


Medals: 17
Projects: 2
Exp: 4 years


Your face. Your ass. What's the difference?


« Reply #30 - Posted 2014-07-02 07:15:52 »

My only "advice" is to look in to how you create your diffuse variable in the shader. You are doing something incorrect when calculating it. It appears as though all the vertices/normals are being passed in properly.

Working on a nice FPS in lwjgl Smiley http://i.imgur.com/q4uFqBS.png
Feel free to message me if you're interested!
Offline Slyth2727
« Reply #31 - Posted 2014-07-06 19:27:14 »

Think of it in a mathematical sense, not from a coding perspective. Step through all the different mathematical operations and make sure that they make sense. If you don't know what one line does, figure it out. This will make sure that you know exactly what's going on and you will start to see where stuff could go wrong.

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline Spacebeans
« Reply #32 - Posted 2014-07-07 04:14:43 »

Think of it in a mathematical sense, not from a coding perspective. Step through all the different mathematical operations and make sure that they make sense. If you don't know what one line does, figure it out. This will make sure that you know exactly what's going on and you will start to see where stuff could go wrong.

I know most about what it does (Normals, Vectors, and Interpolation), but not all of it. I've looked this code over plenty of times, and it should be working... I've tried everything I could think of...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline thedanisaur
« Reply #33 - Posted 2014-07-08 19:40:44 »

It's been a while since I've written a Phong shader, but I'm curious what happens if you change the light color from 100, 100, 100, to 1.0, 1.0, 1.0

Every village needs an idiot Cool
Offline Spacebeans
« Reply #34 - Posted 2014-07-09 22:29:52 »

change the light color from 100, 100, 100, to 1.0, 1.0, 1.0

I tried that a while ago, It just gave me the same result, but the black-face just faded out slower during movement than before.
Pages: 1 [2]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (63 views)
2014-11-26 15:22:04

toopeicgaming1999 (56 views)
2014-11-26 15:20:36

toopeicgaming1999 (10 views)
2014-11-26 15:20:08

SHC (24 views)
2014-11-25 12:00:59

SHC (24 views)
2014-11-25 11:53:45

Norakomi (27 views)
2014-11-25 11:26:43

Gibbo3771 (24 views)
2014-11-24 19:59:16

trollwarrior1 (37 views)
2014-11-22 12:13:56

xFryIx (76 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!