1 registered members (AbrahamR),
717
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Flat Shading
#136526
06/15/07 08:18
06/15/07 08:18
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
D3DRS_SHADEMODE = D3DSHADE_FLAT
This is all the info I could find, but could you add a method for using flat-shading in shaders? or is the only way to unweld all vertices?
xXxGuitar511 - Programmer
|
|
|
Re: Flat Shading
[Re: ello]
#136528
06/15/07 11:23
06/15/07 11:23
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
http://msdn2.microsoft.com/en-us/library/bb509706.aspxQuote:
nointerpolationDo not interpolate the outputs of a vertex shader before passing them to a pixel shader.
i think you put "nointerpolation" before your output texture coordinate in your vertex shader. i don't know though, i just happened to come across this today on msdn.
hope this helps!
julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: Flat Shading
[Re: Joey]
#136530
06/15/07 13:25
06/15/07 13:25
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
if it doesn't work, say "no" and explain why.
a little research showed nointerpolation is DX10, so you're right, but your post wasn't helpful.
julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: Flat Shading
[Re: xXxGuitar511]
#136533
06/15/07 22:56
06/15/07 22:56
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
@joey: that's fair enough, except that there's often more than one way to do something. there was just the implication that u were assuming shademode is the only way to do it, and you may be right but there wasn't any apparent consideration as to whether or not nointerpolation would work. i don't want to start an argument, and you were right. but i'm just justifying my response julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: Flat Shading
[Re: Joey]
#136535
06/16/07 09:01
06/16/07 09:01
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
me too, when something isn't isn't 100% clear sometimes i forget not to assume it's said aggressively
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
|