Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / shader to prevent texture stretching

Author
Message
sovr
15
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 29th Aug 2015 22:13
Hello everyone! I was wondering if anyone knew of a shader for dbpro to prevent texture stretching when scaling a primitive objects?

website: http://worksimpleintelligen.wix.com/parkers-apps
facebook: https://www.facebook.com/ParkersApps
youtube: http://www.youtube.com/user/mrsovr
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 31st Aug 2015 01:46 Edited at: 2nd Sep 2015 18:08
What do you mean exactly? If you don't stretch the texture with the object then it will look wrong on things like people. If you mean things like terrain where you merely want things like grass to keep their original size relative to world units then what's wrong with using scale object texture? See snippet below:



[Actually, when I run that code the textures on objects 2 and 3 look dull. Not quite sure why that is. ] [Edit This is a well-known "feature" of the way DBPro handles lighting for scaled objects - solved by using the command set normalization on. It catches me out every time. ]



Powered by Free Banners

Login to post a reply

Server time is: 2025-08-09 02:29:07
Your offset time is: 2025-08-09 02:29:07