axmol/tests/lua-tests/src
Paul Gardiner 6b27f014fc Correct the Skybox fov (#16655)
* Remove undrawn quads from the skybox mesh

CCSkybox had been implemented using a combination of two
inconsistent techniques. The rendering was being achieved via use of
the vertex shader's inherent support for cubemaps. That technique requires
only a single screen-covering quad, but the implemtation defined a cube.
Defining a cube mesh would be appropriate if one were simply mapping the
cubemap's 6 textures to faces, but is unnecessary if using the shader's
cubemap feature.

Not only was the use of a cube mesh unnecessary, but the particular way
the cube was defined and used meant that only one face would ever
contribute to the rendering. One of the other faces would always be culled
and the other four would be viewed edge on, mapping the the infinitesimally
thin lines defining the edges of the screen.

This commit simply removes the never-rendered faces, and adds comments
explaining the technique.

* Within test code, remove setScale calls applied to skyboxes.

A Skybox is defined in such a way that it's position, rotation and
scaling has no effect on it's rendering, so setScale has no effect.
The calls are removed from test code to avoid confusing anyone using
it as a template for their own programs.

* Make the Skybox correctly account for the camera's fov

The Skybox does not use the model/view and projection matricies. Instead
a single quad that maps exactly to the screen is rendered and the camera's
world matrix is passed into a shader that renders using cubemap lookups.
The way that works hardwires the fov to 90deg in both the horizontal and
vertical. That shows up particularly badly when the camera is pointed
directly downwards and rotated: the image deforms as it rotates.

This commit corrects the problem by using scaling factors from the
camera's projection matrix to prescale the matrix passed into the shader.
2016-10-17 13:46:26 +08:00
..
AccelerometerTest Rename lua cc.Label:create to cc.Label:createWithTTF and cc.Label.createWithSystemFont 2014-04-11 15:25:18 +08:00
ActionManagerTest Rename lua cc.Label:create to cc.Label:createWithTTF and cc.Label.createWithSystemFont 2014-04-11 15:25:18 +08:00
ActionsEaseTest [lua] Reverts 'removing tolua.cast in test case, I don't know why it was re-added. 2014-03-12 14:06:57 +08:00
ActionsProgressTest Rename lua cc.Label:create to cc.Label:createWithTTF and cc.Label.createWithSystemFont 2014-04-11 15:25:18 +08:00
ActionsTest Deprecate DrawPrimitives and enhance DrawNode 2014-09-11 15:39:56 +08:00
AssetsManagerExTest Update Lua AssetsManagerEx test 2014-10-20 14:12:55 +08:00
AssetsManagerTest fix AssetsManager could not work after Pull Request #13893 was merged. 2016-06-22 14:31:26 +08:00
BillBoardTest Lua: add cc.vec3 functions - add, sub, mul and dot (#16706) 2016-10-17 10:39:40 +08:00
BugsTest Fix the cocos3.6beta0 bugs 2015-04-22 10:20:21 +08:00
ByteCodeEncryptTest Android arm64-v8a also uses Luajit. (#16352) 2016-08-15 14:57:04 +08:00
Camera3DTest Lua: add cc.vec3 functions - add, sub, mul and dot (#16706) 2016-10-17 10:39:40 +08:00
CaptureScreenTest Remove useless codes 2014-07-04 17:15:34 +08:00
ClickAndMoveTest Renames 'samples' folder to 'tests', ouch.... 2014-03-11 19:10:34 +08:00
CocosDenshionTest Fix the cocos3.6beta0 bugs 2015-04-22 10:20:21 +08:00
ComponentTest Fix when leave "ComponentTest" scene, background music still go on playing in lua-test under Android system 2015-11-06 11:38:41 +08:00
CurrentLanguageTest Rename lua cc.Label:create to cc.Label:createWithTTF and cc.Label.createWithSystemFont 2014-04-11 15:25:18 +08:00
DrawPrimitivesTest Deprecate DrawPrimitives and enhance DrawNode 2014-09-11 15:39:56 +08:00
EffectsAdvancedTest issue #9820:Inconsistent :setBlendFunc(...) function binding for Sprite and LabelBMFont classes 2015-01-14 13:51:09 +08:00
EffectsTest Update project setting for lua-tests、lua-empty-test and lua-game-controller-test on the different platform and related test codes 2014-10-14 21:34:55 +08:00
ExtensionTest fix script samples error with controlButton 2015-12-19 22:22:41 +08:00
FastTiledMapTest Deprecate DrawPrimitives and enhance DrawNode 2014-09-11 15:39:56 +08:00
FontTest Fix FontTest' output error message-> “cocos2d: removeChildByTag(tag = 0): child not found!” 2014-10-19 22:35:30 +08:00
IntervalTest Replace cc.LabelBMFont:create with cc.Label:createBMFont 2014-03-12 18:33:28 +08:00
KeypadTest Update values of KeyCode used in the Lua to fix related error 2014-06-11 10:10:11 +08:00
LabelTest update label string every 0.1s 2016-03-29 15:25:18 +08:00
LabelTestNew Fix the some lua tests case bug 2015-06-25 15:13:01 +08:00
LayerTest Fix the LayerTest error about Lua 2015-06-23 20:02:26 +08:00
LightTest Remove some comments 2014-10-18 00:29:04 +08:00
LuaBridgeTest Fix LuaBridgeTest require error 2014-10-21 11:52:33 +08:00
MaterialSystemTest issue #12046: Add Lua bindings for material systems and related test cases. 2015-05-27 15:37:59 +08:00
MenuTest Rename lua cc.Label:create to cc.Label:createWithTTF and cc.Label.createWithSystemFont 2014-04-11 15:25:18 +08:00
MotionStreakTest Renames 'samples' folder to 'tests', ouch.... 2014-03-11 19:10:34 +08:00
NavMeshTest Lua: add cc.vec3 functions - add, sub, mul and dot (#16706) 2016-10-17 10:39:40 +08:00
NewAudioEngineTest [LUA]Add New AudioEngine on window 2014-10-17 17:53:33 +08:00
NewEventDispatcherTest Add 3d touch support to iOS 9.0 or higher version on iPhone6s or later device 2015-12-01 13:02:53 +08:00
NodeTest issue #9820:Inconsistent :setBlendFunc(...) function binding for Sprite and LabelBMFont classes 2015-01-14 13:51:09 +08:00
OpenGLTest [lua-tests] Reverts uniform after GetUniformTest. (#16357) 2016-08-15 09:41:18 +08:00
ParallaxTest Fix z-fighting error by using setDepthTest of cc.Director 2015-01-30 11:03:47 +08:00
Particle3DTest Add tizen support (#15518) 2016-04-28 09:49:55 +08:00
ParticleTest Added Particle Emitter Pause option, and tests (#15836) 2016-06-15 18:31:10 +08:00
Physics3DTest Lua: add cc.vec3 functions - add, sub, mul and dot (#16706) 2016-10-17 10:39:40 +08:00
PhysicsTest Fix spelling for `getPolygonCenter` function 2016-07-19 08:24:22 +09:00
RenderTextureTest Comments fix in CCRenderTexture.h 2014-05-07 16:37:21 +08:00
RotateWorldTest Rename lua cc.Label:create to cc.Label:createWithTTF and cc.Label.createWithSystemFont 2014-04-11 15:25:18 +08:00
Scene3DTest Correct the Skybox fov (#16655) 2016-10-17 13:46:26 +08:00
SceneTest Renames 'samples' folder to 'tests', ouch.... 2014-03-11 19:10:34 +08:00
SpineTest Upgrades to Spine v3.4 (#16242) 2016-07-28 07:25:50 -07:00
Sprite3DTest Correct the Skybox fov (#16655) 2016-10-17 13:46:26 +08:00
SpritePolygonTest fix polygon api typo 2016-03-17 17:16:56 +08:00
SpriteTest fix the bugs of SpriteTest that the Sprite created by passing rect display error 2014-04-22 13:41:10 +08:00
TerrainTest Lua: add cc.vec3 functions - add, sub, mul and dot (#16706) 2016-10-17 10:39:40 +08:00
TextInputTest add UIEditBox support linux platform. 2015-09-18 17:11:58 +08:00
Texture2dTest issue #9820:Inconsistent :setBlendFunc(...) function binding for Sprite and LabelBMFont classes 2015-01-14 13:51:09 +08:00
TileMapTest Deprecate DrawPrimitives and enhance DrawNode 2014-09-11 15:39:56 +08:00
TouchesTest Update project setting for lua-tests、lua-empty-test and lua-game-controller-test on the different platform and related test codes 2014-10-14 21:34:55 +08:00
TransitionsTest Update project setting for lua-tests、lua-empty-test and lua-game-controller-test on the different platform and related test codes 2014-10-14 21:34:55 +08:00
UserDefaultTest Rename lua cc.Label:create to cc.Label:createWithTTF and cc.Label.createWithSystemFont 2014-04-11 15:25:18 +08:00
VibrateTest Merged changes from "Vibrate support in v4" into v3 branch. 2015-06-26 01:02:44 +02:00
VideoPlayerTest Update Sprite3DTest and VideoPlayerTest about Lua 2015-04-28 11:27:50 +08:00
WebViewTest Add Lua bindings for WebView and related test case 2015-04-17 14:08:47 +08:00
XMLHttpRequestTest Updates XMLHttpRequestTest.lua 2015-09-12 19:11:32 +08:00
ZwoptexTest Renames 'samples' folder to 'tests', ouch.... 2014-03-11 19:10:34 +08:00
VisibleRect.lua Update project setting for lua-tests、lua-empty-test and lua-game-controller-test on the different platform and related test codes 2014-10-14 21:34:55 +08:00
controller.lua Luajit (#16620) 2016-09-28 16:19:20 +08:00
helper.lua Fix the some lua tests case bug 2015-06-25 15:13:01 +08:00
mainMenu.lua Revert luajit (#16397) 2016-08-19 11:49:19 +08:00
testResource.lua Add Scene3DTest and update TerrainTest based on the Lua 2015-05-19 16:52:39 +08:00