ICode9

精准搜索请尝试: 精确搜索
  • Osg-OsgShader着色器(Qt5.14.2+osgE3.6.5+win10)-No19-OsgShader2022-07-13 13:31:43

    .pro 1 QT += core gui widgets 2 TARGET = TestOsgQt 3 TEMPLATE = app 4 DEFINES += QT_DEPRECATED_WARNINGS 5 CONFIG += c++11 6 7 QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO 8 QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_W

  • 使得图片变为可读的---解决报错Texture '图片名' is not readable, the texture memory can not be accessed from2022-07-08 11:03:32

    //使得图片变为可读的---解决报错Texture '图片名' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings. private Texture2D duplicateTexture(Texture2D source) { RenderT

  • YV12 YUV转RGB2022-07-05 15:00:34

    const char fragmentShader_yuv420p[] = { "precision mediump float;\n" "uniform sampler2D Ytex;\n" "uniform sampler2D Utex,Vtex;\n" "varying vec2 vTextureCoord;\n" "void main(void) {\n" " float nx,

  • Unity 提取像素图2022-02-18 13:02:36

    using System.Collections; using System.Collections.Generic; using UnityEngine; using System.IO; public class Test : MonoBehaviour { public int m_x; public int m_y; IEnumerator enumerator() { int a = 0; Texture2D[]

  • Texture2D、Sprite动态图集2021-10-22 15:04:16

    public AtlasRegion Pack(string path) { var tex = Load<Texture2D>(path, false); if (tex == null) { Debug.LogWarningFormat("[Packer] {0} not found", path); return null; } if (tex.width > width || tex.h

  • 【Unity3D】不可读Texture资源的获取2021-09-26 14:31:28

    直接上代码 1 // 创建一个与纹理大小相同的临时 RenderTexture 2 RenderTexture tmp = RenderTexture.GetTemporary( 3 texture.width, 4 texture.height, 5 0, 6 RenderTextureFor

  • 通过command line使用texturepacker publish unity texture2D sprite2021-09-08 15:34:35

    命令行工具在安装目录下的 TexturePacker.exe三种办法调用:  1. 直接在cmd中调用此程序  2. 将安装目录添加到环境变量Path下  3. 同一cmd下使用前调用SET "PATH=[HomePath];%PATH%"  具体方法可以在GUI版本下的 File>Insatll Command Line Tool 中查看 在cmd中输入texture

  • C++使用gdiplus库加载图片_艾孜尔江撰2021-06-12 11:32:21

    #include "LoadBitmap.h" #include <windows.h> #include <gdiplus.h> #include <iostream> #include <fstream> #include <sstream> #pragma comment(lib, "gdiplus.lib") using namespace std; using namespace Gdiplu

  • Unity代码将文件夹中的图片在rawImage中显示2021-05-03 17:31:31

    目录 一.目的 1.想知道:Unity路径下面图片转换为texture 二.参考 1.Unity_Window平台从本地读取图片并转化Texture2D

  • 【Unity开源项目精选】AssetStudio:提取Unity游戏的资源2020-12-01 10:57:36

    洪流学堂,让你快人几步。你好,我是你的技术探路者郑洪智,你可以叫我大智。 今天给你分享一个Unity开源项目,我们一起来看看吧! AssetStudio AssetStudio 是一个用于探索、提取和导出asset和assetbundle的工具。 特征 支持Unity版本: 2.5 - 2020.1 支持资产类型: Texture2D : co

  • Texture2D纹理蒙皮2019-12-05 13:51:48

    1.需求 在一层特殊纹理基础上蒙皮另一张纹理。只要采用像素相乘既可以实现。 2.实现 using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;[ExecuteInEditMode]public class TextureCreator : MonoBehaviour{ public Te

  • 可以在OpenGL中从多个Texture2D objs创建一个Texture2D_Array吗?2019-10-28 03:08:07

    关于我的打算: 我有一个图像堆栈,出于几个原因,我需要它们全部都是单独的2D纹理.然后,对于某些组合显示,我需要像其中的5-10个将它们融合在一起(在Texture2d_Array中是完美的).我的想法是采用已经上传的2D纹理并将其形成Texture2d阵列. OpenGL给我的功能有可能吗? 备注:我想避免重新加

  • unity中让Texture2D显示在Image上的问题2019-08-27 18:53:37

    让一张自己处理过的Texture2D显示在Image上,网上基本上都是这么写的: image.material.mainTexture = texture2d; 但是这么做带来的问题是,如果你赋值的image下还有一张image,你会发现这个子image也被赋值了这张Texture2D。所以,为了解决这种问题,不妨用RawImage: rawImage.texture = text

  • javascript – 使用WebGL重复纹理2019-08-26 19:33:14

    我需要在单个元素中重复纹理.它甚至可以在WebGL中使用吗? 我试过以下任何一种,但没有运气. ctx.texParameteri(ctx.TEXTURE_2D, ctx.TEXTURE_WRAP_S, ctx.CLAMP_TO_EDGE); ctx.texParameteri(ctx.TEXTURE_2D, ctx.TEXTURE_WRAP_T, ctx.CLAMP_TO_EDGE); ctx.texParameteri(ctx.TEXT

  • 【Cocos2d-x 学习笔记 】目录2019-08-09 22:57:39

    从2019年7月开始学习游戏引擎Cocos2dx,版本3.17。 ‎Cocos2d-x 学习笔记(3.2) Layer ‎Cocos2d-x 学习笔记(4) Scheduler Timer 调度与定时 Cocos2d-x 学习笔记(6) Sprite SpriteFrameCache Texture2D TextureCache Cocos2d-x 学习笔记(7) 内存管理 Sprite SpriteFrame Texture2D

  • c# – 将SurfaceTexture渲染为Unity Texture2D2019-07-11 12:05:28

    我之前提出过simillar问题,但是他们并没有很好地澄清,现在我想建议我在我的代码中做错了什么. 所以我要做的是将SurfaceTexture从Android插件渲染到Unity Texture2D. 这是我的Unity代码: public class AndroidHandler : MonoBehaviour { [SerializeField] private RawImag

  • c# – 截图捕获和显示2019-07-08 14:14:22

    我正在创建一个应用程序,我希望能够存储屏幕截图,然后显示它.我的代码运行正常,屏幕截图被存储,并且程序似乎也没有问题地收到.但是,它没有显示屏幕截图,这非常令人沮丧.这是我的代码: void OnGUI(){ if (GUI.Button (new Rect(940,y+25, Screen.width/30, Screen.height/14),

  • Unity -- 普通截图和相机截图以及图片保存2019-07-04 22:06:09

    Unity -- 普通截图和相机截图以及图片保存UnityEngine自带API方法ScreenCapture.CaptureScreenshot(string filename);ScreenCapture.CaptureScreenshotAsTexture();使用Texture2D读取屏幕像素对相机拍摄区域进行截图最后附上代码: 在项目中需要用到Unity的截图,于是查阅了很

  • 在OpenCL内核中读取GL_UNSIGNED_BYTE OpenGL texture2D(android)2019-07-03 08:14:40

    我的Android应用程序将OpenGL texture2D传递给我的OpenCL内核,但是我的内核读取的像素值超出界限(> 255). 我像这样创建我的OpenGL纹理: GLES20.glGenTextures ( 2, targetTex, 0 ); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, targetTex[0]); GLES20.glTexParameter

  • MonoGame 3.2 下,截屏与 Texture2D 的保存2019-06-30 10:24:30

    10月20日注:后来发现了这篇博文(英文),XNA 中的 Color 实际上是与 Alpha 值自左乘(premultiplied)的,这也解释了直接用 0xARGB 转译而颜色异常的原因。   注意,由于采用的是 MonoGame 3.2,因此方法与 XNA 4.0 不完全相同。 目标是将当前 GraphicsDevice 的内容保存为一个 Texture2D,同时

  • osg::Texture2D 贴纹理2019-06-29 21:55:14

      #ifdef _WIN32#include <Windows.h>#endif // _WIN32#include<iostream>#include <osgViewer/Viewer>#include <osgViewer/ViewerEventHandlers> #include <osgViewer/CompositeViewer> #include <osgDB/ReadFile>#include <osg/Ge

  • Unity c#,截取屏幕截图并以jpg格式保存到文件中2019-05-28 18:13:25

    我正在尝试使用screencapture并将其保存为jpg格式的文件.我正在关注这个例子. http://docs.unity3d.com/ScriptReference/Texture2D.EncodeToPNG.html 这是我到目前为止: string jpgFile = Application.persistentDataPath + "/scrn-1.jpg"; Texture2D tex = new Texture2D

  • Unity2D图集剪裁2019-05-10 20:49:53

    Unity2D图集的剪裁 转载http://blog.csdn.net/hongyouwei/article/details/45011315 Unity3D拓展菜单 [MenuItem("Assets/Tools/剪切2d sprite小工具")] 获取当前点击的对象,与需要剪裁的图片路径(自定义) AssetDatabase.GetAssetPath(image);//获取image文件在assets下的

  • Unity --- MeshRenderer之网格合并2019-03-11 21:43:07

    创建如图所示的对象结构,parent为空对象,然后将下面的代码挂载到parent对象上运行即可。 1 using UnityEngine; 2 using System.Collections; 3 4 public class CombineMeshAndMaterials : MonoBehaviour 5 { 6 void Start() 7 { 8 CombineMesh(); 9 }10

  • Texture转Texture2D2019-02-27 11:03:18

    private Texture2D TextureToTexture2D(Texture texture) { Texture2D texture2D = new Texture2D(texture.width, texture.height, TextureFormat.RGBA32, false); RenderTexture currentRT = RenderTexture.active; RenderTexture renderTexture

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有