Loading tests/RenderScriptTests/ShadersTest/Android.mk 0 → 100644 +26 −0 Original line number Diff line number Diff line # # Copyright (C) 2011 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-renderscript-files-under, src) LOCAL_PACKAGE_NAME := ShadersTest include $(BUILD_PACKAGE) tests/RenderScriptTests/ShadersTest/AndroidManifest.xml 0 → 100644 +32 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2011 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.shaderstest"> <uses-permission android:name="android.permission.INTERNET" /> <application android:label="_ShadersTest"> <activity android:name="ShadersTest" android:label="_ShadersTest" android:theme="@android:style/Theme.Black.NoTitleBar"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> tests/RenderScriptTests/ShadersTest/res/drawable-nodpi/robot.png 0 → 100644 +286 KiB Loading image diff... tests/RenderScriptTests/ShadersTest/res/raw/depth_fs.glsl 0 → 100644 +13 −0 Original line number Diff line number Diff line void main() { // Non-linear depth value float z = gl_FragCoord.z; // Near and far planes from the projection // In practice, these values can be used to tweak // the focus range float n = UNI_near; float f = UNI_far; // Linear depth value z = (2.0 * n) / (f + n - z * (f - n)); gl_FragColor = vec4(z, z, z, 1.0); } tests/RenderScriptTests/ShadersTest/res/raw/robot.a3d 0 → 100644 +141 KiB File added.No diff preview for this file type. View file Loading
tests/RenderScriptTests/ShadersTest/Android.mk 0 → 100644 +26 −0 Original line number Diff line number Diff line # # Copyright (C) 2011 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-renderscript-files-under, src) LOCAL_PACKAGE_NAME := ShadersTest include $(BUILD_PACKAGE)
tests/RenderScriptTests/ShadersTest/AndroidManifest.xml 0 → 100644 +32 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2011 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.shaderstest"> <uses-permission android:name="android.permission.INTERNET" /> <application android:label="_ShadersTest"> <activity android:name="ShadersTest" android:label="_ShadersTest" android:theme="@android:style/Theme.Black.NoTitleBar"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
tests/RenderScriptTests/ShadersTest/res/drawable-nodpi/robot.png 0 → 100644 +286 KiB Loading image diff...
tests/RenderScriptTests/ShadersTest/res/raw/depth_fs.glsl 0 → 100644 +13 −0 Original line number Diff line number Diff line void main() { // Non-linear depth value float z = gl_FragCoord.z; // Near and far planes from the projection // In practice, these values can be used to tweak // the focus range float n = UNI_near; float f = UNI_far; // Linear depth value z = (2.0 * n) / (f + n - z * (f - n)); gl_FragColor = vec4(z, z, z, 1.0); }
tests/RenderScriptTests/ShadersTest/res/raw/robot.a3d 0 → 100644 +141 KiB File added.No diff preview for this file type. View file